Bug#350583: debootstrap 0.3.3
retitle 350583 debootstrap: relies on sed s///I extension
tags 350583 pending
On Mon, Jan 30, 2006 at 04:13:22PM +0100, Patrik Arvhult wrote:
> I am trying to run a bootstrap from Linux 1.2.3 (maybe it is slackware 96) to
> debian Sarge.
> (No CDROMS, only floppies/network avail. Using the
> debootstrap_0.3.3.tar.gz bootstrapper I found refered to by the debian
> webbpages. Actually I didnt find any information on what version to use,
> 0.3.3 seems to be the newest one.
It's best to just use whatever's most current. debootstrap doesn't tend
to drop backward compatibility.
> debootstrap_0.3.3.tar.gz -> file pkgdetails.c
> there is a int "any" declared in a new style. Not very portable and not
> feasible if bootstrapping from some old system. Annoying, but good thing
> there were only one of these and not zillions ;)
> Change row 43 from "int any=0;" to just "any=0;"
> Insert "int any=0;" betwen row 23 and 24.
This was fixed a little while ago by Anthony Towns in debootstrap 1.0.0:
* Make pkgdetails.c not need C99 extensions. (Closes: Bug#398977)
> Something similar to a tar -O bug seems to be present in this debootstrap
> package, at a glance it seems to be the same error as mentioned at:
> http://lists.debian.org/debian-boot/2003/05/msg00450.html, bug 193788. That
> is another package, but the error seems very similar:
> running "debootstrap --verbose --arch i386 sarge /mnt/debinst \
> All packages is downloaded, when unpacking starts it stops with this message:
> dpkg: parse error, in file '/var/lib/dpkg/status' near line 2
> package 'dpkg': error in Version string '': version string is empty"
As you observe, this is due to using the I flag to sed's s command. I've
replaced this as follows, which should work even on your ancient system:
- sed -ne 's/^Version: *//Ip' | head -n 1
+ grep -i ^Version: | sed -e 's/[^:]*: *//' | head -n 1
Colin Watson [firstname.lastname@example.org]