-sub readpackages() {
- my $root; # Root of archive we are scanning
- my $archive; # Name of archive we are scanning
- my $sect; # Name of current section
- my $arch; # Name of current architecture
-
- $root=shift;
- $archive=shift;
- for $arch ( @bugcfg::architectures ) {
- for $sect ( @bugcfg::sections) {
- open(P, "zcat $root/$sect/binary-$arch/Packages.gz|")
- or die "open: $root/$sect/binary-$arch/Packages.gz: $!\n";
- while (<P>) {
+sub readpackages {
+ my ($root,$archive) = @_;
+ for my $arch ( @bugcfg::architectures ) {
+ for my $sect ( @bugcfg::sections) {
+ my $p = glob_compressed_fh("$root/$sect/binary-$arch/Packages.*");
+ while (<$p>) {