• Bug#264869: debootstrap: Empty version for dpkg in /var/lib/dpkg/status

    From Holger Mense@1:229/2 to All on Wed Aug 18 11:40:10 2004
    From: [email protected]

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hi,

    Andreas Schockenhoff pointed out in a posting to the fai mailinglist, that
    this bug is related to not using the woody version of sed. (http://www.uni-koeln.de/bin2/maillist/linux-fai/20040810.210801/165312). Instead of sed 3, sed 4 from backports was installed, when this bug
    occured.

    # dpkg -l sed
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-====================-====================-========================================================
    ii sed 4.0.9-2.backports.or The GNU sed stream editor

    The following patch should correct the problem and decides on the sed
    version number, which sed commands to use:

    === cut ===
    - --- woody.orig Mon Aug 9 21:14:07 2004
    +++ woody Wed Aug 18 11:03:35 2004
    @@ -112,7 +112,12 @@
    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
    + if [ `sed --version | head -1 | awk '{ print $4}' | cut -d. -f1` -gt 3 ] ; then
    + sed -ne 's/^Version: *//p' | head -n 1
    + else
    + sed -ne 's/^Version: *//Ip' | head -n 1
    + fi
    +
    )"

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

    MfG Holger Mense

    - --
    Holger Mense
    Rechnerbetrieb Mathematik
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBIx61HjdfhHqYjTQRAlAaAJ4zIhvuCwWofcayl5UL3mLtNQFKMwCePKmP 8tXOM/MojD8DaPxBedPUvPE=
    =iWMa
    -----END PGP SIGNATURE-----



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)