improve the efficiency of the new output for sources.
git-svn-id: http://emdebian.org/svn/current@7386 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
a57a7a0c4d
commit
7528669e79
1 changed files with 5 additions and 6 deletions
11
multistrap
11
multistrap
|
@ -901,16 +901,14 @@ sub dump_config {
|
||||||
" cannot be parsed correctly."), $file);
|
" cannot be parsed correctly."), $file);
|
||||||
warn ("\n$msg\n");
|
warn ("\n$msg\n");
|
||||||
}
|
}
|
||||||
# Translators: followed by a list of section names from the config file.
|
|
||||||
printf ("bootstrap:\t"._g("Sections specifying packages for downloading in the bootstrap: ").join (", ", sort @debootstrap)."\n");
|
|
||||||
# Translators: followed by a list of section names from the config file.
|
|
||||||
printf ("aptsources:\t"._g("Sections specifying apt sources in the final system: ").join (", ", sort @aptsources)."\n");
|
|
||||||
@check=();
|
@check=();
|
||||||
%uniq=();
|
%uniq=();
|
||||||
push @check, @debootstrap;
|
push @check, @debootstrap;
|
||||||
push @check, @aptsources;
|
push @check, @aptsources;
|
||||||
foreach my $sect (@check) { $uniq{$sect}++; }
|
foreach my $sect (@check) { $uniq{$sect}++; }
|
||||||
foreach my $sect (sort keys %uniq) {
|
@check = sort keys %uniq;
|
||||||
|
%uniq=();
|
||||||
|
foreach my $sect (@check) {
|
||||||
if (not exists $keys{$sect}) {
|
if (not exists $keys{$sect}) {
|
||||||
$msg .= sprintf (_g("ERR: The '%s' section is not defined.\n"), $sect);
|
$msg .= sprintf (_g("ERR: The '%s' section is not defined.\n"), $sect);
|
||||||
}
|
}
|
||||||
|
@ -922,7 +920,7 @@ sub dump_config {
|
||||||
}
|
}
|
||||||
# explain the bootstrap section details explicitly and just refer to
|
# explain the bootstrap section details explicitly and just refer to
|
||||||
# those for the apt sources.
|
# those for the apt sources.
|
||||||
foreach my $sect_name (@debootstrap) {
|
foreach my $sect_name (@check) {
|
||||||
printf ("Section:\t$sect_name\n");
|
printf ("Section:\t$sect_name\n");
|
||||||
print "\tsource: \t$sources{$sect_name}\n";
|
print "\tsource: \t$sources{$sect_name}\n";
|
||||||
my @sorted = split(/ /, $packages{$sect_name});
|
my @sorted = split(/ /, $packages{$sect_name});
|
||||||
|
@ -935,6 +933,7 @@ sub dump_config {
|
||||||
print "\tsuite: \t$suites{$sect_name}\n";
|
print "\tsuite: \t$suites{$sect_name}\n";
|
||||||
print "\tcomponent\t$components{$sect_name}\n";
|
print "\tcomponent\t$components{$sect_name}\n";
|
||||||
# only packages can have a list
|
# only packages can have a list
|
||||||
|
next if (not grep(/^$sect_name$/i, @debootstrap));
|
||||||
print "\tBootstrap:\tpackages: ".join(" ", @sorted)."\n";
|
print "\tBootstrap:\tpackages: ".join(" ", @sorted)."\n";
|
||||||
}
|
}
|
||||||
printf ("Bootstrap:\t%s: %s\n", _g("Sections"), join(" ", sort @debootstrap));
|
printf ("Bootstrap:\t%s: %s\n", _g("Sections"), join(" ", sort @debootstrap));
|
||||||
|
|
Loading…
Reference in a new issue