[BusyBox] dpkg usage: invalid ar header

Jared Rhine jared at wordzoo.com
Thu Aug 7 12:38:19 UTC 2003


[Glenn == bug1 at optushome.com.au on Thu, 31 Jul 2003 21:55:41 +1000]

Jared> I don't seem to be able to use dpkg.  Are there issues I should
Jared> know about?  I'm probably misusing the feature, but not sure
Jared> what I'm doing wrong.

Glenn> Fix is in CVS, it turned out to be pretty simple, you should
Glenn> have more luck now.

Ok, thanks.

But no joy.

On a freshly-built copy of:

  http://www.busybox.net/downloads/snapshots/busybox-unstable-20030806.tar.bz2

I get this:

-- begin --

BusyBox v1.00-pre2 (2003.08.06-23:12+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # mkdir /tmp/hello && cd /tmp/hello && wget http://http.us.debian.org/debian/pool/main/h/hello/hello_2.1.1-1_i386.deb
hello_2.1.1-1_i386.d 100% |*****************************| 47900       00:00 ETA
/tmp/hello # dpkg -i hello_2.1.1-1_i386.deb
Unpacking hello (from hello_2.1.1-1_i386.deb) ...
dpkg: crc error

-- end --

There's only one place this error comes from: unzip.c line 1030

-- begin --

-> find /mnt/d4/coll.software.living-room-os/work/pkg/busybox/ -type f |xargs grep "crc error" | egrep -vi 'binary file'
/mnt/d4/coll.software.living-room-os/work/pkg/busybox/busybox/archival/unzip.c: bb_error_msg("Invalid compressed data--crc error");
/mnt/d4/coll.software.living-room-os/work/pkg/busybox/busybox/archival/libunarchive/unzip.c: bb_error_msg_and_die("crc error");
/mnt/d4/coll.software.living-room-os/work/pkg/busybox/busybox/libbb/interface.c: unsigned long rx_crc_errors;    /* recved pkt with crc error    */

-- end --

This is all after I've put a simple /var/lib/dpkg/status in place, of
course; otherwise dpkg exits with a "dpkg: /var/lib/dpkg/status: No
such file or directory" error.

The control.tar.gz and data.tar.gz files inside can be untarred correctly:

-- begin --

/tmp/hello # ls -l
-rw-r--r--    1 root     root        47900 Aug  7 05:25 hello_2.1.1-1_i386.deb
/tmp/hello # ar -x hello_2.1.1-1_i386.deb
/tmp/hello # tar zxf data.tar.gz
/tmp/hello # tar zxf control.tar.gz
/tmp/hello # ls -l
-rw-r--r--    1 root     root          604 Oct 12  2002 control
-rw-r--r--    1 root     root          648 Aug  7 05:31 control.tar.gz
-rw-r--r--    1 root     root        47059 Aug  7 05:31 data.tar.gz
-rw-r--r--    1 root     root            4 Aug  7 05:31 debian-binary
-rw-r--r--    1 root     root        47900 Aug  7 05:25 hello_2.1.1-1_i386.deb
-rwxr-xr-x    1 root     root          103 Oct 12  2002 postinst
-rwxr-xr-x    1 root     root           74 Oct 12  2002 prerm
drwxr-xr-x    4 root     root           80 Aug  7 05:31 usr

-- end --

-- jared at wordzoo.com

War is God's way of teaching Americans geography. -Ambrose Bierce



More information about the busybox mailing list