Comment 2 for bug 7379

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20040810184001.GA2035@deb1>
Date: 10 Aug 2004 14:40:01 -0400
From: "Arcady Genkin" <email address hidden>
To: "Debian Bug Tracking System" <email address hidden>
Subject: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when bootstraping woody

Package: debootstrap
Version: 0.1.17
Severity: grave
Justification: renders package unusable

I can reproduce this bug with the following versions of debootstrap
0.1.17, 0.2.39.1, 0.2.41-0.2 (the latter two built as source DEBs)
under woody. The bug exists when trying to bootstrap woody. I noticed
the bug when using debootsrap from under make-fai-nfsroot script of the
`fai' debian package, but later found that the problem exists when using
debootstrap directly.

In a nutshell, the command:

  debootstrap --arch i386 woody \
 /tmp/nfsroot file:/debmirror/debian

fails with the following error message:

I: Installing core packages...
dpkg: parse error, in file `/var/lib/dpkg/status' near line 2 package `dpkg':
 error in Version string `': version string is empty
W: Failure trying to run: chroot /tmp/nfsroot dpkg --force-depends
 --install /var/cache/apt/archives/base-files_3.0.2_i386.deb
 /var/cache/apt/archives/base-passwd_3.4.1_i386.deb

The same failure is observed when used with the official Debian
mirror (i.e. http://ftp.debian.org/debian/ instead of the file: URI),
so I don't think that this is a mirror problem.

The full output of the above invocation of debootstrap can be viewed here:
http://www.cdf.toronto.edu/~agenkin/tmp/debootstrap/debootstrap_out.txt
The full output of the above command run with "sh -x" can be viewed here:
http://www.cdf.toronto.edu/~agenkin/tmp/debootstrap/debootstrap_out.sh-x.txt

Note that I had a look at the Debian bug #193788, but the proposed
solution didn't work for me.

The below crude hack by Holger Mense seems to let me work around the problem
and get going for now, so I think that the problem is with setting the
$ver variable properly in the scripts/woody script.

=== cut ===
--- /usr/lib/debootstrap/scripts/woody.orig Wed Jun 16 15:22:39 2004
+++ /usr/lib/debootstrap/scripts/woody Wed Jun 16 15:22:46 2004
@@ -119,7 +119,7 @@

         echo \
 "Package: $pkg
-Version: $ver
+Version: 1.9.21
 Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"

         touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
=== cut ===

It seems that I am not the only one observing this problem; for more
discussion, you may want to have a look at the following thread on the
FAI mailing list:

http://www.mail-archive.com/linux-fai%40rrz.uni-koeln.de/msg02029.html

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux deb1 2.4.25-i386-cdf-workstation #1 Mon Apr 19 17:01:18 EDT 2004 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages debootstrap depends on:
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
ii wget 1.9.1-3.backports.org.1 retrieves files from the web

Many thanks,
--
Arcady Genkin : CDF Systems Administrator
http://www.cdf.toronto.edu/~agenkin/contact.html