[SCM] Debian package checker branch, master, updated. 2.2.12-36-gd43f9f9
The following commit has been merged in the master branch:
commit d39c0daeea25566e4228128cd305884e09f4d7e2
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sat Jun 20 14:24:55 2009 -0500
Include area information in the package lists
diff --git a/lib/Read_pkglists.pm b/lib/Read_pkglists.pm
index 81c3589..74a950e 100644
--- a/lib/Read_pkglists.pm
+++ b/lib/Read_pkglists.pm
@@ -28,9 +28,9 @@ use vars qw($BINLIST_FORMAT $SRCLIST_FORMAT $UDEBLIST_FORMAT %source_info %binar
# these banner lines have to be changed with every incompatible change of the
# binary and source list file formats
-$BINLIST_FORMAT = "Lintian's list of binary packages in the archive--V3";
-$SRCLIST_FORMAT = "Lintian's list of source packages in the archive--V3";
-$UDEBLIST_FORMAT = "Lintian's list of udeb packages in the archive--V2";
+$BINLIST_FORMAT = "Lintian's list of binary packages in the archive--V4";
+$SRCLIST_FORMAT = "Lintian's list of source packages in the archive--V4";
+$UDEBLIST_FORMAT = "Lintian's list of udeb packages in the archive--V3";
%source_info = ();
%binary_info = ();
@@ -64,7 +64,7 @@ sub read_src_list {
while (<IN>) {
chop;
next if /^\s*$/o;
- my ($src,$ver,$maint,$uploaders,$arch,$std,$bin,$files,$file,$timestamp) = split(/\;/,$_);
+ my ($src,$ver,$maint,$uploaders,$arch,$area,$std,$bin,$files,$file,$timestamp) = split(/\;/,$_);
my $src_struct;
%$src_struct =
@@ -74,6 +74,7 @@ sub read_src_list {
'maintainer' => $maint,
'uploaders' => $uploaders,
'architecture' => $arch,
+ 'area' => $area,
'standards-version' => $std,
'binary' => $bin,
'files' => $files,
@@ -115,7 +116,7 @@ sub read_bin_list {
chop;
next if /^\s*$/o;
- my ($bin,$ver,$source,$source_ver,$file,$timestamp) = split(/\;/o,$_);
+ my ($bin,$ver,$source,$source_ver,$file,$timestamp,$area) = split(/\;/o,$_);
my $bin_struct;
%$bin_struct =
@@ -126,6 +127,7 @@ sub read_bin_list {
'source-version' => $source_ver,
'file' => $file,
'timestamp' => $timestamp,
+ 'area' => $area,
);
$binary_info{$bin} = $bin_struct;
@@ -162,7 +164,7 @@ sub read_udeb_list {
chop;
next if /^\s*$/o;
- my ($udeb,$ver,$source,$source_ver,$file,$timestamp) = split(/\;/o,$_);
+ my ($udeb,$ver,$source,$source_ver,$file,$timestamp,$area) = split(/\;/o,$_);
my $udeb_struct;
%$udeb_struct =
@@ -173,6 +175,7 @@ sub read_udeb_list {
'source-version' => $source_ver,
'file' => $file,
'timestamp' => $timestamp,
+ 'area' => $area,
);
$udeb_info{$udeb} = $udeb_struct;
diff --git a/unpack/list-binpkg b/unpack/list-binpkg
index 6a36ca0..cf6b40a 100755
--- a/unpack/list-binpkg
+++ b/unpack/list-binpkg
@@ -86,24 +86,30 @@ print OUT "$BINLIST_FORMAT\n";
# parse Packages file to get list of packages
my @packages;
-for my $area (split(/\s*,\s*, $LINTIAN_AREA)) {
- push @packages, "$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST/$area/".
- "binary-$LINTIAN_ARCH/Packages";
+foreach my $area (split /\s*,\s*/,$LINTIAN_AREA) {
+ my %hash;
+ $hash{'dist'} = $LINTIAN_DIST;
+ $hash{'arch'} = $LINTIAN_ARCH;
+ $hash{'area'} = $area;
+ $hash{'file'} = "$LINTIAN_ARCHIVEDIR/dists/$hash{'dist'}/$hash{'area'}/" .
+ "binary-$hash{'arch'}/Packages";
+ push @packages, \%hash;
}
my %packages;
my $total = 0;
foreach my $packages (@packages) {
- if (-e $packages) {
- print "N: Parsing $packages ...\n" if $verbose;
- open(IN, '<', $packages) or fail("cannot open Packages file $packages: $!");
- } elsif (-e "$packages.gz") {
- print "N: Parsing $packages.gz ...\n" if $verbose;
- open (IN, '-|', 'gzip', '-dc', "$packages.gz")
- or fail("cannot open Packages file $packages.gz: $!");
+ my $pkgs_file = $packages->{'file'};
+ if (-e $pkgs_file) {
+ print "N: Parsing $pkgs_file ...\n" if $verbose;
+ open(IN, '<', $pkgs_file) or fail("cannot open Packages file $pkgs_file: $!");
+ } elsif (-e "$pkgs_file.gz") {
+ print "N: Parsing $pkgs_file.gz ...\n" if $verbose;
+ open (IN, '-|', 'gzip', '-dc', "$pkgs_file.gz")
+ or fail("cannot open Packages file $pkgs_file.gz: $!");
} else {
- fail("No packages file $packages");
+ fail("No packages file $pkgs_file");
}
my $line;
@@ -172,6 +178,7 @@ foreach my $packages (@packages) {
$data->{'source-version'},
$deb_file,
$timestamp,
+ $packages->{'area'}
),"\n";
printf "N: Listed %s binary package %s %s\n",$status,$pkg,$data->{'version'} if $verbose;
diff --git a/unpack/list-srcpkg b/unpack/list-srcpkg
index c13bf42..c926aa0 100755
--- a/unpack/list-srcpkg
+++ b/unpack/list-srcpkg
@@ -83,16 +83,22 @@ print OUT "$SRCLIST_FORMAT\n";
# parse Sources.gz to get list of packages
my @sources;
-for my $area (split(/\s*,\s*, $LINTIAN_AREA)) {
- push @sources, "$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST/$area/source/Sources.gz";
+foreach my $area (split /\s*,\s*/,$LINTIAN_AREA) {
+ my %hash;
+ $hash{'dist'} = $LINTIAN_DIST;
+ $hash{'area'} = $area;
+ $hash{'file'} = "$LINTIAN_ARCHIVEDIR/dists/$hash{'dist'}/$hash{'area'}/" .
+ "source/Sources.gz";
+ push @sources, \%hash;
}
my %packages;
my $total = 0;
foreach my $sources (@sources) {
- print "N: Parsing $sources ...\n" if $verbose;
- open(IN, '-|', 'zcat', $sources) or fail("Cannot open input pipe from zcat $sources: $!");
+ print "N: Parsing $sources->{'file'} ...\n" if $verbose;
+ open(IN, '-|', 'zcat', $sources->{'file'})
+ or fail("Cannot open input pipe from zcat $sources->{'file'}: $!");
my $line;
@@ -169,6 +175,7 @@ foreach my $sources (@sources) {
$data->{'maintainer'},
$data->{'uploaders'} || '',
$data->{'architecture'},
+ $sources->{'area'},
$data->{'standards-version'},
$data->{'binary'},
$data->{'files'},
diff --git a/unpack/list-udebpkg b/unpack/list-udebpkg
index 3e90c00..fc81857 100755
--- a/unpack/list-udebpkg
+++ b/unpack/list-udebpkg
@@ -87,24 +87,30 @@ print OUT "$UDEBLIST_FORMAT\n";
# parse Packages file to get list of packages
my @packages;
-for my $area (split(/\s*,\s*, $LINTIAN_AREA)) {
- push @packages, "$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST/$area/".
- "debian-installer/binary-$LINTIAN_ARCH/Packages";
+foreach my $area (split /\s*,\s*/,$LINTIAN_AREA) {
+ my %hash;
+ $hash{'dist'} = $LINTIAN_DIST;
+ $hash{'arch'} = $LINTIAN_ARCH;
+ $hash{'area'} = $area;
+ $hash{'file'} = "$LINTIAN_ARCHIVEDIR/dists/$hash{'dist'}/$hash{'area'}/" .
+ "debian-installer/binary-$hash{'arch'}/Packages";
+ push @packages, \%hash;
}
my %packages;
my $total = 0;
foreach my $packages (@packages) {
- if (-e $packages) {
- print "N: Parsing $packages ...\n" if $verbose;
- open(IN, '<', $packages) or fail("cannot open Packages file $packages: $!");
- } elsif (-e "$packages.gz") {
- print "N: Parsing $packages.gz ...\n" if $verbose;
- open(IN, '-|', 'gzip', '-dc', "$packages.gz")
- or fail("cannot open Packages file $packages.gz: $!");
+ my $pkgs_file = $packages->{'file'};
+ if (-e $pkgs_file) {
+ print "N: Parsing $pkgs_file ...\n" if $verbose;
+ open(IN, '<', $pkgs_file) or fail("cannot open Packages file $pkgs_file: $!");
+ } elsif (-e "$pkgs_file.gz") {
+ print "N: Parsing $pkgs_file.gz ...\n" if $verbose;
+ open(IN, '-|', 'gzip', '-dc', "$pkgs_file.gz")
+ or fail("cannot open Packages file $pkgs_file.gz: $!");
} else {
- warn("No packages file $packages, skipping");
+ warn("No packages file $pkgs_file, skipping");
next;
}
@@ -174,6 +180,7 @@ foreach my $packages (@packages) {
$data->{'source-version'},
$deb_file,
$timestamp,
+ $packages->{'area'},
),"\n";
printf "N: Listed %s udeb package %s %s\n",$status,$pkg,$data->{'version'} if $verbose;
--
Debian package checker
Reply to: