Don't waste time on calling read_entry_simple for removed
packages. Also fix error detection for this call. The result
is always defined (and an array reference), errors can be
detected by checking whether the referenced array is empty.
my %archives = map { $_ => 1 } qw( us security non-US );
foreach (sort keys %changes) {
my %archives = map { $_ => 1 } qw( us security non-US );
foreach (sort keys %changes) {
- my $entry = read_entry_simple( \%packages, $_, \%archives, $suite)
- or die "Fatal Error: Can't find entry for package $_\n";
- shift @$entry; # remove virtual pkg info
+ my $entry = [];
+ if ($changes{$_} == 1) {
+ $entry = read_entry_simple( \%packages, $_, \%archives, $suite);
+ die "Fatal Error: Can't find entry for package $_\n"
+ unless @$entry;
+ shift @$entry; # remove virtual pkg info
+ }
print CHANGES join(" ", $_, $age, @$entry)."\n";
print "Wrote entry: ".join(" ", $_, $age, @$entry)."\n";
}
print CHANGES join(" ", $_, $age, @$entry)."\n";
print "Wrote entry: ".join(" ", $_, $age, @$entry)."\n";
}