Denis Vlasenko
b3b0753593
dpkg: fix bug where existence check was reversed
2008-02-17 14:29:25 +00:00
Denis Vlasenko
abee3d0e0d
Fix xmalloc_fgets_str so that it really does NOT strip terminator.
...
Add xmalloc_fgetline_str which does strip terminator,
and use it in dpkg instead of xmalloc_fgets_str.
netstat: use xmalloc_fgets_str - allows to eat strings with NULs
(this fixes bug with some weird /proc/net/unix input)
function old new delta
xmalloc_fgets_internal - 191 +191
xmalloc_fgetline_str - 18 +18
do_info 116 120 +4
unix_do_one 451 447 -4
tcp_do_one 423 419 -4
send_tree 369 365 -4
xmalloc_fgets_str 178 15 -163
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175) Total: 38 bytes
text data bss dec hex filename
778445 832 7344 786621 c00bd busybox_old
778483 832 7344 786659 c00e3 busybox_unstripped
2007-12-26 20:44:45 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
fe7cd642b0
don't pass argc in getopt32, it's superfluous
...
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
dbe6e66d6a
trylink: automatically use custom link script if user provides one
...
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
2007-08-14 16:43:01 +00:00
Denis Vlasenko
e324184c05
s/#ifdef CONFIG_/#if ENABLE_/g
2007-08-13 10:36:25 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
b71c668c57
style fix (stray space before ';')
2007-07-21 15:08:09 +00:00
Denis Vlasenko
15611bb958
A few more string duplicates found & eliminated
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
679693 2700 15632 698025 aa6a9 busybox_old
679523 2700 15632 697855 aa5ff busybox_unstripped
2007-06-12 08:52:02 +00:00
Bernhard Reutner-Fischer
6c501a71ae
- kiltedknight writes: Busybox incorrectly parses a line from the status file, claiming that a required package is not installed or tagged to be installed when it actually is.
...
Closes #1221
2007-06-05 17:28:56 +00:00
Bernhard Reutner-Fischer
fa5f20755c
- fix typo in error message. Closes #1308
2007-06-05 17:07:01 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
ac678ec2f1
style fixes, no code changes
2007-04-16 22:32:04 +00:00
Denis Vlasenko
334fa9bcb5
dpkg: use nitfields which are a bit closer to typical ushort.
...
Code size -800.
2007-04-13 23:22:58 +00:00
Denis Vlasenko
53f83d68fb
dpkg: run_package_script() returns 0 if all ok and non-zero if failure.
...
The result code was checked incorrectly in two places.
(from "Kim B. Heino" <Kim.Heino@bluegiga.com>)
2007-03-29 19:42:19 +00:00
Denis Vlasenko
88a2aa98e0
dpkg: free_package(NULL) is ok, so don't test for NULL, just free.
2007-03-19 21:48:56 +00:00
Bernhard Reutner-Fischer
de8a6a01d8
Kim B. Heino writes:
...
When installing a new package with dpkg dependencies are checked
correctly. But when I try to update an existing package, the
dependencies are checked against the old package, not against new
package. Thus the new package can break dependencies.
2007-03-19 13:44:18 +00:00
Denis Vlasenko
baca175912
kill superfluous returns at the end of void functions
2007-03-11 13:43:10 +00:00
Denis Vlasenko
7fd00cbff7
dpkg: fix segfault on "dpkg -i"
2007-02-15 21:19:50 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
4cccc03768
remove useless casts (type*) xzalloc(...)
2006-12-22 18:37:07 +00:00
Denis Vlasenko
a6df5907d2
dpkg: getopt32-ification etc, -100 bytes
2006-12-22 18:32:40 +00:00
Denis Vlasenko
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
Denis Vlasenko
5af906e7c8
rename: compare_string_array -> index_in_str_array
...
introduce index_in_substr_array and use it in
iproute2
2006-11-05 18:05:09 +00:00
Denis Vlasenko
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
2d5ca60bfb
bb_get_[chomped]line_from_file wasn't descriptive enough.
...
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
a6dbb08a48
small style fixes
2006-10-12 19:29:44 +00:00
Denis Vlasenko
aecabffb8b
dpkg: fix use-after-free (bug 939)
2006-09-30 21:05:25 +00:00
Denis Vlasenko
5492884311
dpkg: style fixes; short -> int (generated code is smaller)
2006-09-28 22:35:42 +00:00
Denis Vlasenko
57308afb5b
dpkg: reduce bss usage by ~130 kbytes (yes, kilobytes!)
...
at the cost of ~100 bytes of text.
Improves friendliness to nommu systems.
(Dunno whether nommu people ever use dpkg, though...)
2006-09-28 22:34:46 +00:00
Denis Vlasenko
c16bd212e3
silly switch style fix
2006-09-27 19:51:06 +00:00
Denis Vlasenko
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Denis Vlasenko
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +00:00
Rob Landley
02496aa69e
The bb_ prefixes were removed from xasprintf() and xopen() a month ago (in
...
svn 15767).
2006-09-05 13:48:21 +00:00
Denis Vlasenko
1da6a21666
dpkg: fix buffer overflow (bug 983)
2006-09-03 16:33:58 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
"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