[Pkg-ia32-libs-maintainers] Bug#512634: Bug#512634: [PATCH] Re: ia32-libs-tools: subprocess post-installation script returned error , exit status 134

Goswin von Brederlow goswin-v-b at web.de
Mon Mar 9 13:22:44 UTC 2009


Taisuke Yamada <tai.debian at cc.rakugaki.org> writes:

> Hi.
>
> I was recently hit by ia32-apt-get bug (Bug #512634) caused by
> zero-size *_Packages file, and it seems no official response was
> made since January.
>
> This can be fixed by simply ignoring such *_Packages file,
> so I'm sending in this one-line patch. Please include it in
> next release.
>
> Best Regards,
> Taisuke Yamada
> --- apt-get.orig	2009-03-09 11:39:25.000000000 +0900
> +++ apt-get	2009-03-09 11:39:11.000000000 +0900
> @@ -66,6 +66,7 @@
>  
>    # Mangle foreign files
>    for F in $LISTDIR/foreign/lists/*_*; do
> +    test -s "$F" || continue
>      DIR="$(dirname "$F")"
>      case "$F" in
>        *_Packages)

That would leave the old file in place possibly giving a checksum
error.

I've just commited the following patch to svn.debian.org pkg-ia32-libs:

--- ia32-libs-tools/mangle.cc   (revision 245)
+++ ia32-libs-tools/mangle.cc   (working copy)
@@ -224,7 +224,8 @@
     std::vector<PkgDepOr> pkgAnd;
     size_t parse(std::string& s, size_t offset) {
        while(offset < s.length()) {
-            if (s[offset] == ' ' || s[offset] == ',') {
+            if (s[offset] == ' ' || s[offset] == ','
+               || s[offset] == '\t' || s[offset] == '\n') {
                 ++offset;
                 continue;
             }
@@ -399,7 +400,9 @@
            assert(buf != NULL);
        }
     }
-    assert(buf_used > 1);
+    // In case of empty file
+    if (buf_used < 2) exit(0);
+    // Ensure end of stanza at end of file
     while(buf[buf_used-2] != '\n') {
        buf[buf_used++] = '\n';
     }

The first chunk fixes the original problem of having multi-line
Depends in the Packages file. The second chunk fixes the problem for
empty files.

MfG
        Goswin





More information about the Pkg-ia32-libs-maintainers mailing list