[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#193788: busybox-cvs-udeb: Missing 'tar -O' support break base-installer



Package: busybox-cvs-udeb
Version: 0.60.99.cvs20030426-4
Severity: grave

I've gotten my boot CD almost back in working order after the new
cdebconf made it into the archive.  Now it stops in base-installer
when it calls debootstrap.  This is the error message in
debootstrap.err.log:

  dpkg: parse error, in file '/var/lib/dpkg/status' near line 2
    package 'dpkg': error in Version string '': version string is empty"

Checking the file, I see that the error message is correct.  This is
the file content:

  Package: dpkg
  Version: 
  Status: install ok installed

Checking further, I tracked the problem into debootstrap, and the
following code:

    x_feign_install () {
        local pkg="$1"
        local deb="$(debfor $pkg)"
        local ver="$(
            ar -p "$TARGET/$deb" control.tar.gz | zcat |
                tar -O -xf - control ./control 2>/dev/null |
                sed -ne 's/^Version: *//Ip' | head -n 1
        )"

        mkdir -p "$TARGET/var/lib/dpkg/info"

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

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

The code extracting the version fails with the call to tar.  It
doesn't produce any output, and thus sed and head is unable to extract
the version number.

When running the commands by hand, the control file is saved to the
file system, not printed on stdout.  It seems to me that -O do not
work as it should with the tar applet in busybox-cvs-udeb
0.60.99.cvs20030426-4.



Reply to: