[SCM] Debian package checker branch, master, updated. 2.2.2-39-g601fbd1
The following commit has been merged in the master branch:
commit 7596ed51732a857a05ce5ca244cf00ff210fdbaf
Author: Raphael Geissert <atomo64@gmail.com>
Date: Mon Feb 2 16:53:00 2009 -0600
Generate an index of the source tarball at unpack level 1
diff --git a/unpack/unpack-srcpkg-l1 b/unpack/unpack-srcpkg-l1
index 4b9c237..970fb95 100755
--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -35,6 +35,8 @@ use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Util;
use File::Basename;
+use Lintian::Command qw(spawn);
+use Dpkg::Version qw(parseversion);
# stat $file
(my @stat = stat $file) or fail("$file: cannot stat: $!");
@@ -58,13 +60,29 @@ for my $field (keys %$data) {
# Install symbolic links to source package files
my $dir = dirname($file);
my $name = basename($file);
+my $tarball;
+my %version = parseversion($data->{'version'});
+my $basename = $data->{'source'} . '_' . $version{'version'};
+my $basenamerev = $data->{'source'} . '_' . $data->{'version'};
+
symlink($file,"$base_dir/dsc") or fail("cannot symlink dsc file: $!");
for my $fs (split(/\n/,$data->{'files'})) {
next if $fs =~ /^\s*$/o;
my @t = split(/\s+/o,$fs);
+ $tarball = $t[2] if ($t[2] =~ /^(?:\Q$basename\E\.orig|\Q$basenamerev\E)\.tar\.(gz|bz2|lzma)$/);
symlink("$dir/$t[2]","$base_dir/$t[2]") or fail("cannot symlink file $t[2]: $!");
}
+if (!$tarball) {
+ fail("could not find the source tarball");
+}
+
+# create index file for package
+spawn({ fail => 'error', out => "$base_dir/index" },
+ ["tar", "tfv", $tarball],
+ '|', ["sed", "-e", "s/^h/-/"],
+ '|', ["sort", "-k", "6"]);
+
# Create symbolic links to binary packages
mkdir("$base_dir/binary", 0777) or fail("mkdir $base_dir/binary: $!");
for my $bin (split(/,\s+/o,$data->{'binary'})) {
--
Debian package checker
Reply to: