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

Bug#843436: dpkg: FTBFS on !linux



Package: dpkg
Version: 1.18.11
Severity: important
User: debian-hurd@lists.debian.org
Usertags: hurd

Hello,

dpkg currently FTBFS on !linux:

../../scripts/t/Dpkg_Source_Package.t ...... ok
Dpkg_Dist_Files.t: error: badly formed line in files list file, line 1
# Looks like you planned 26 tests but ran 22.
# Looks like your test exited with 255 just after 22.
../../scripts/t/Dpkg_Dist_Files.t ..........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/26 subtests

This is because when looking through files in the directory, load_dir
also looks at "." and "..", and it happens that on kfreebsd & hurd, one
can open a directory as a file (and we get the content of the directory
inode), so dpkg should explicitly test against directories, here is a
patch proposal.

This is quite bad since libdpkg-perl depends on dpkg:hurd-i386 (>=
1.18.11), so all packages using debhelper are currently non-buildable.

Samuel
--- ./scripts/Dpkg/Dist/Files.pm.original	2016-11-06 17:32:31.000000000 +0000
+++ ./scripts/Dpkg/Dist/Files.pm	2016-11-06 17:33:16.000000000 +0000
@@ -111,6 +111,7 @@
     my $dh = IO::Dir->new($dir) or syserr(g_('cannot open directory %s'), $dir);
 
     while (defined(my $file = $dh->read)) {
+        next if (-d $file);
         $count += $self->load("$dir/$file");
     }
 

Reply to: