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

Bug#517899: internal error: command failed with error code 123 in collect info file-info



Thijs Kinkhorst <thijs@debian.org> writes:

> I get the following output when I check a mailman source package.
>
> $ lintian mailman_2.1.12-1.dsc
> Use of uninitialized value $_ in substitution (s///) at /usr/share/lintian/collection/file-info line 50, <INDEX> line 1.

Could you try applying the following patch under /usr/share/lintian and
see if it reliably fixes your problem?

diff --git a/unpack/unpack-srcpkg-l1 b/unpack/unpack-srcpkg-l1
index 79b39e6..cd8b97d 100755
--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -93,8 +93,18 @@ if ($tarball =~ /\.lzma\z/) {
     unshift(@tar_options, '--lzma');
 }
 my @index;
+my $last = '';
 my $collect = sub {
-    for my $line (map { split "\n" } @_) {
+    my @lines = map { split "\n" } @_;
+    if ($last ne '') {
+        $lines[0] = $last . $lines[0];
+    }
+    if ($_[-1] !~ /\n\z/) {
+        $last = pop @lines;
+    } else {
+        $last = '';
+    }
+    for my $line (@lines) {
         $line =~ s/^h/-/;
         if ($line and $line !~ m,^(?:\S+\s+){5}\./$,) {
             push(@index, $line . "\n");
@@ -103,6 +113,9 @@ my $collect = sub {
 };
 spawn({ fail => 'error', out => $collect },
       ["tar", @tar_options, "$base_dir/$tarball"]);
+if ($last) {
+    fail("tar output doesn't end in a newline");
+}
 
 # We now need to see if all files in the tarball have a common prefix.  If so,
 # we're going to strip that prefix off each file name.  We also remove lines

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: