Commit Graph

140 Commits

Author SHA1 Message Date
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
"Robert P. J. Day"
edd9ca5743 More removal of "#if 0" content. 2006-07-01 14:52:12 +00:00
Bernhard Reutner-Fischer
d2c306e862 - ls: remove unused variable
- dpkg.c, diff: use xstat
   text    data     bss     dec     hex filename
 848823    9100  645216 1503139  16efa3 busybox_old
 848679    9100  645216 1502995  16ef13 busybox_unstripped
bloatcheck is completely useless as it sees -79 for this, which is bogus.
2006-05-29 12:10:23 +00:00
Rob Landley
1ec5b29054 More size shrinkage. 2006-05-29 07:42:02 +00:00
Rob Landley
8bb50782a5 Change llist_add_* to take the address of the list rather than returning the new
head, and change all the callers.
2006-05-26 23:44:51 +00:00
Rob Landley
a389651115 Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
e7c43b66d7 Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
Rob Landley
0a7c8ef6e2 Patch from Denis Vlasenko to constify things and fix a few typos. 2006-02-22 17:01:00 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Mike Frysinger
1eef0c4571 Bernhard Fischer says: use xmalloc() instead of malloc() 2005-08-16 05:32:42 +00:00
Paul Fox
37dd6247dd applying fix for:
0000093: Patch for dpkg - can't handle scripts
	      Attached patch is needed to fix dpkg's support for preinst,
	       postinst etc script files.
2005-07-22 13:17:41 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Mike Frysinger
4e5936ef95 In Bug 208, bernhardf writes:
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
b8c3a54531 Patch from Ian Campbell, fix or'ed dependencies and handle virtual
dependencies.
2003-11-28 22:38:14 +00:00
Glenn L McGrath
fea4b446df Important bugfixes from Ian Campbell.
init_archive_deb_data()
        We want to filter for data.tar.* in the AR file not the TAR
        file, else we get nothing.

all_control_list()
        Make the 'extensions' array of control file names a global so it
        can be used in unpack_package as well. Name the global
        all_control_files. Don't hard code the length of
        all_control_files but instead used sizeof.

unpack_package()
        Only unpack the control files we are interested in (from
        all_control_files). Extract the data.tar.gz into / rather than
        the current directory.

dpkg_main()
        Configure packages in a second pass so all the packages being
        installed are unpacked before configuring.

Some purely cosmetic changes:

header
        update list of differences since two of them are no longer true.
        The .control file is no longer stored as a result of this patch
        -- it was redundant since the info is in status. New packages
        appear to be added to the end of the status file now rather than
        the start.

remove_package()
        Make message printing optional, so we can avoid a redundant
        message when replacing/upgrading a package. When we do print
        stuff then include the version number.

purge_package()
        Print "Purging xxx (yyy) ..." message like the other actions.

configure_package()
        Add "..." to "Setting up" message to be consistent with other
        actions.
2003-11-26 21:53:37 +00:00
Eric Andersen
1393a39df4 Do not shadow the global name 'accept' 2003-09-15 08:06:15 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
b323162aab Use libbb/get_line_from_file instead of getline 2002-12-11 03:10:13 +00:00
Glenn L McGrath
66125c8065 Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free). 2002-12-08 00:54:33 +00:00
Glenn L McGrath
b963875a3e Move compare_string_array to libbb 2002-12-02 00:01:36 +00:00
Aaron Lehmann
a170e1c858 Change if(x)free(x); to free(x); 2002-11-28 11:27:31 +00:00
Glenn L McGrath
62d28828d6 Use a switch instead of successive if (strcmp()) statments. 2002-11-06 23:35:28 +00:00
Glenn L McGrath
747381c602 Split deb_extract() into more generic functions 2002-11-06 22:54:41 +00:00
Glenn L McGrath
d8d1191505 Support for bziped debs, i.e. use .tar.bz2 instead .tar.gz internally 2002-11-05 13:56:04 +00:00
Glenn L McGrath
6ab32eb34c Move data_extract_all_prefix to dpkg, its only used there. 2002-11-03 11:57:10 +00:00
Glenn L McGrath
61b7904afd Update dpkg to use new unarchive code 2002-10-19 10:40:55 +00:00
Glenn L McGrath
a94a06a38e Patch from Randolfe Averty to fixup package conflict checks, cleanup some memory leaks and reorganise dependency checking.
Some further memory leaks fixed by me.
2002-05-29 13:45:34 +00:00
Matt Kraai
39fcb5a750 * archival/dpkg.c (create_list): Use chomp.
* archival/tar.c (append_file_list_to_list): Likewise.
2002-01-02 19:01:41 +00:00
Matt Kraai
1f0c43668a Remove == TRUE' tests and convert != TRUE' and `== FALSE' tests to use !. 2001-12-20 23:13:26 +00:00
Glenn L McGrath
aad44fb37a Fix some fegfaults and picket fence 2001-12-05 04:40:52 +00:00
Glenn L McGrath
1dbbd2fe34 Fail gracefully if package depends on a virtual package. 2001-12-05 04:10:14 +00:00
Matt Kraai
efd7f03657 Fix opt type in dpkg (closes: #118975). 2001-11-19 21:07:15 +00:00
Glenn L McGrath
0a25b35c66 Fix create list segfault 2001-11-03 08:29:35 +00:00
Glenn L McGrath
ef0eab514d Recovering from my previous commit 2001-10-25 14:49:48 +00:00
Glenn L McGrath
0d2fb76c11 Modify applets to use libunarchive 2001-10-25 14:26:05 +00:00
Glenn L McGrath
6ccdd8c122 Abort if scripts return value != 0 2001-10-23 17:52:28 +00:00
Matt Kraai
a7512d74fa Process extra empty lines correctly. 2001-10-18 17:03:59 +00:00
Matt Kraai
3dd4f5ed69 Remove xmalloc calls. 2001-10-18 15:08:30 +00:00
Glenn L McGrath
30f68908ef Another part of Stafan's latest patch, when replacing a pre-existing package set its status correctly. 2001-10-06 02:40:20 +00:00
Glenn L McGrath
f28d819554 status_package_num should refer to package not status.
Only initialise a new entry in the status hashtable if it really is a new entry.
2001-10-06 02:27:36 +00:00
Glenn L McGrath
a8412dbf39 Fixes with help from Stefan, Typo in prerm script, and when reinstall a package the old packages status was getting overwritten. 2001-10-04 05:22:42 +00:00
Glenn L McGrath
35636540ea Extract control.tar.gz and data.tar.gz unconditionally, another one picked up by Stefan 2001-10-03 03:10:35 +00:00
Glenn L McGrath
95bfe631a4 Fix return status, picked up by Stefan 2001-09-29 03:34:38 +00:00
Glenn L McGrath
dece3c5684 The <package>.list file was prepending "./" to the files, fixed that.
Also fixed a very silly error by me when running postinst (remember to use the variable BEFORE its freed)
2001-09-22 04:16:55 +00:00
Glenn L McGrath
b8f5adb64f Dont free everytime getline() is used, fix from Stefan Soucek 2001-09-22 03:24:07 +00:00
Glenn L McGrath
48cc89b738 Fix to make preinst run when required, from Stefan Soucek 2001-09-21 05:07:47 +00:00
Glenn L McGrath
e73866181f Implement dpkg -l option, from Stefan Soucek (slightly modified) 2001-09-21 04:30:51 +00:00
Glenn L McGrath
bac490fe53 Fix version comparision bug 2001-08-15 11:25:01 +00:00
Glenn L McGrath
81108e7653 Cleanup (most) memory leaks 2001-07-19 12:15:13 +00:00
Glenn L McGrath
c3fbec73fb Change read_package_field interface, and rewrite using low level functions
Fixes for a few bugs that have crept into dpkg in the last few days
2001-07-18 15:47:21 +00:00
Glenn L McGrath
778041f8d1 Use the unofficial -C instead of -c to --configure a package, -c conflicts with another dpkg command 2001-07-18 05:17:39 +00:00
Glenn L McGrath
ed4492a697 More feedback to user 2001-07-18 05:03:49 +00:00
Glenn L McGrath
7b0241579c Be more verbose when configureing package, minor changes 2001-07-18 04:33:31 +00:00
Glenn L McGrath
4cdc607f72 Use xfopen to abort on error to prevent segfaulting later. 2001-07-18 03:13:49 +00:00
Glenn L McGrath
58a5bd187d Tolerate fields with no data, e.g. "Depends: " 2001-07-14 06:25:54 +00:00
Glenn L McGrath
ccd65c9be6 Total rewrite, uses hash tables for speed and low memory use. 2001-07-13 18:35:24 +00:00
Glenn L McGrath
59e50f634a Unpack the filename not the package name 2001-07-11 03:30:11 +00:00
Eric Andersen
807bda4a24 Minor update to include file ordering 2001-07-07 08:13:02 +00:00
Eric Andersen
24982c589b Fix up some warnings that show up on ppc 2001-06-25 19:31:48 +00:00
Matt Kraai
ceeff73819 Rewrote mkdir (and touched lots of things in the process). 2001-06-21 19:41:37 +00:00
Glenn L McGrath
9aff903603 Reorganise archive extraction code 2001-06-13 07:26:39 +00:00
Eric Andersen
5a9d441b2c Fix up some signed char vs int issues that show up on powerpc. 2001-05-24 14:16:28 +00:00
Matt Kraai
7cedac567c Remove unused function. If necessary, we can use remove_file instead. 2001-05-17 04:03:22 +00:00
Eric Andersen
c1bdffe99b Another nice cleanup from Larry. This adds a new last_char_is() function and
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the
possible space-hogging inline of strlen() in several cases.
 -Erik
2001-04-26 15:56:47 +00:00
Glenn L McGrath
ae1c704c44 Write full status file 2001-04-16 10:26:46 +00:00
Glenn L McGrath
33431ebb9a dpkg improvements, use full package struct, avoid extracting to tmp dir, rename variable.
deb_extract, untar and dpkg_deb modified to make the above possible
2001-04-16 04:52:19 +00:00
Glenn L McGrath
4949faf4b2 copy_file_chunk uses streams now. 2001-04-11 16:23:35 +00:00
Glenn L McGrath
d22e560ad6 Move deb_extract() to libbb, dpkg now independent of dpkg-deb 2001-04-11 02:12:08 +00:00
Eric Andersen
e5dfced23a Apply Vladimir's latest cleanup patch.
-Erik
2001-04-09 22:48:12 +00:00
Glenn L McGrath
305fdfa755 Reorganise status field to use 3 chars instead of one bit shifted long int.
Generates status file properly now, not compatable with full dpkg yet.
2001-04-08 13:27:39 +00:00
Glenn L McGrath
37849f3320 Use create_path instead of mkdir 2001-04-08 07:23:53 +00:00
Glenn L McGrath
13e9c7ad82 It now correctly backs up the (still corrupt) status file 2001-04-08 07:18:08 +00:00
Glenn L McGrath
0e757a2f3f Some fixes, but still broken... (cont)
Make better use of some libbb functions
New remove dir code to avoid depending on the rm applet
dont use copy_file() it doesnt fail elegantly
Use getopt.
Generate correct /var/lib/dpkg/info/ files
Status file is broken, working on it now
2001-04-08 05:27:18 +00:00
Eric Andersen
4e2439ad27 It seems all the stdout munging was useless anyways, since
deb_extract and all its called functions do nothing with
stdout anyways.  Axe that stuff.
 -Erik
2001-04-05 18:30:38 +00:00
Eric Andersen
e76c3b08e1 A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables.  Move (almost) all syscalls to libbb/syscalls.c, so I can
handle them sanely and all at once.
 -Erik
2001-04-05 03:14:39 +00:00
Mark Whitley
3bf60aa723 If only BB_DPKG was enabled in Config.h, busybox would not build; it'd say:
dpkg.c:18: #error It looks like you are using libc5, which does not support
  dpkg.c:19: #error tfind().  tfind() is used by busybox dpkg.
  dpkg.c:20: #error Please disable BB_DPKG.  Sorry.
This was fixed by changing the || to an && in the preprocessor.
(We've changed the logic in there too many times.)
Found using multibuild.pl.
2001-03-15 17:39:29 +00:00
Eric Andersen
82d8502409 Fix from Manuel for a silly thinko on my part. 2001-03-14 17:15:45 +00:00
Eric Andersen
3c0b425cde dpkg used tfind, which doesn't work with libc5. Print a friendy error
should someone try to use it...
 -Erik
2001-03-14 01:31:11 +00:00
Eric Andersen
3e6ff9017f A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
2001-03-09 21:24:12 +00:00
Eric Andersen
b50d707633 fix a few mallocs to be xmallocs.
-Erik
2001-02-15 19:50:11 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Glenn L McGrath
3af1f88725 Closer integration with dpkg-deb and other busybox functions.
Hopefully simplified some code (works for me).
2001-02-12 11:33:09 +00:00
Glenn L McGrath
631064613f More style changes 2001-02-11 01:40:23 +00:00
Glenn L McGrath
0c9d77ccfd Style changes; use get_line_from_file from utilities 2001-02-11 00:17:22 +00:00
Glenn L McGrath
510f0ddafa Use copy_file from utilty.c, remove some char defines 2001-02-10 14:53:08 +00:00
Glenn L McGrath
649968ceb1 Bug fix, rename status file, cleanups 2001-02-10 14:26:48 +00:00
Glenn L McGrath
af8c65deaa Replace status defines with const int to conform to sytle guide, adds 32 bytes 2001-02-10 03:19:51 +00:00
Glenn L McGrath
c900575dc4 Initial import 2001-02-10 02:05:24 +00:00