my $suitedir = "$toplevel/$suite";
for my $component ('main', 'main/debian-installer',
- 'contrib', 'non-free') {
+ 'contrib', 'contrib/debian-installer',
+ 'non-free', 'non-free/debian-installer',
+ ) {
my $componentdir = "$suitedir/$component";
- next unless -d $componentdir;
+ if (not -d $componentdir) {
+ print STDERR "No directory $suitedir/$component\n" if $DEBUG;
+ next;
+ }
my $COMPONENT;
opendir $COMPONENT, $componentdir or die "opendir $componentdir: $!";
# debian-installer is really a section rather than a component
# (ugh).
- (my $viscomponent = $component) =~ s[/.*][];
+ my $viscomponent = $component;
+ $viscomponent =~ s[/.*][];
- my $sources = (grep { -f $_ } glob "$suitedir/$component/source/Sources.*")[0];
- next unless defined $sources;
+ my $sources = (grep { -f $_ } glob "$componentdir/source/Sources.*")[0];
+ if (not defined $sources) {
+ print STDERR "No sources matching $componentdir/source/Sources.*\n" if $DEBUG;
+ next;
+ }
read_packages($db,$db2,$sources, $viscomponent,'source',$suite);
for my $arch (readdir $COMPONENT) {
my $archdir = "$componentdir/binary-$arch";
my $packages = (grep { -f $_ } glob("$archdir/Packages.*"))[0];
- next unless defined $packages;
+ if (not defined $packages) {
+ print STDERR "No binary packages matching $archdir/Packages.*\n" if $DEBUG;
+ next;
+ }
read_packages($db,$db2,$packages, $viscomponent,$arch,$suite);
}