Expand the --simulate option output further.
git-svn-id: http://emdebian.org/svn/current@7561 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
17346c36f8
commit
f5fe180960
2 changed files with 66 additions and 35 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -13,8 +13,9 @@ multistrap (2.1.8) experimental; urgency=low
|
||||||
* Improve check-deps to find missing packages
|
* Improve check-deps to find missing packages
|
||||||
* Drop all use of forceyes - no longer necessary.
|
* Drop all use of forceyes - no longer necessary.
|
||||||
* Handle missing 'include' files cleanly and early. (Closes: #595006)
|
* Handle missing 'include' files cleanly and early. (Closes: #595006)
|
||||||
|
* Expand the --simulate option output further.
|
||||||
|
|
||||||
-- Neil Williams <codehelp@debian.org> Sun, 03 Oct 2010 23:20:51 +0100
|
-- Neil Williams <codehelp@debian.org> Sat, 16 Oct 2010 12:36:32 +0100
|
||||||
|
|
||||||
multistrap (2.1.7) unstable; urgency=low
|
multistrap (2.1.7) unstable; urgency=low
|
||||||
|
|
||||||
|
|
98
multistrap
98
multistrap
|
@ -93,10 +93,10 @@ $dpkgdir = "var/lib/dpkg/"; # state
|
||||||
|
|
||||||
$cfgdir=dirname($file);
|
$cfgdir=dirname($file);
|
||||||
cascade($file);
|
cascade($file);
|
||||||
|
# Translators: fields are programname, version string, include file.
|
||||||
|
printf (_g("%s %s using %s\n"), $progname, $ourversion, $file);
|
||||||
|
|
||||||
foreach my $inc (@includes) {
|
foreach my $inc (@includes) {
|
||||||
# Translators: fields are programname, version string, include file.
|
|
||||||
printf (_g("%s %s including %s\n"), $progname, $ourversion, $inc);
|
|
||||||
cascade($inc);
|
cascade($inc);
|
||||||
}
|
}
|
||||||
%uniq=();
|
%uniq=();
|
||||||
|
@ -429,8 +429,8 @@ sub our_version {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub add_extra_packages {
|
sub add_extra_packages {
|
||||||
$str = join (' ', @extrapkgs);
|
if (scalar @extrapkgs > 0) {
|
||||||
if (@extrapkgs) {
|
$str = join (' ', @extrapkgs);
|
||||||
print "apt-get -y $config_str install $str\n";
|
print "apt-get -y $config_str install $str\n";
|
||||||
$retval = system ("apt-get -y $config_str install $str");
|
$retval = system ("apt-get -y $config_str install $str");
|
||||||
&force_unpack (@extrapkgs) if ($unpack eq "true");
|
&force_unpack (@extrapkgs) if ($unpack eq "true");
|
||||||
|
@ -906,6 +906,11 @@ sub cascade {
|
||||||
}
|
}
|
||||||
@reinstall=();
|
@reinstall=();
|
||||||
@reinstall=sort keys %uniq;
|
@reinstall=sort keys %uniq;
|
||||||
|
%uniq=();
|
||||||
|
foreach my $x (@extrapkgs) {
|
||||||
|
$uniq{$x}++;
|
||||||
|
}
|
||||||
|
@extrapkgs = keys %uniq;
|
||||||
# check for old versions of apt, <= 0.7.20.2+lenny1
|
# check for old versions of apt, <= 0.7.20.2+lenny1
|
||||||
my $aptVer = `dpkg-query -W -f='\${Version}' apt`;
|
my $aptVer = `dpkg-query -W -f='\${Version}' apt`;
|
||||||
if (defined $aptVer and ($aptVer ne "")) {
|
if (defined $aptVer and ($aptVer ne "")) {
|
||||||
|
@ -942,6 +947,7 @@ sub dump_config {
|
||||||
" cannot be parsed correctly."), $file);
|
" cannot be parsed correctly."), $file);
|
||||||
warn ("\n$msg\n\n");
|
warn ("\n$msg\n\n");
|
||||||
}
|
}
|
||||||
|
my $plural;
|
||||||
@check=();
|
@check=();
|
||||||
%uniq=();
|
%uniq=();
|
||||||
push @check, @debootstrap;
|
push @check, @debootstrap;
|
||||||
|
@ -955,15 +961,19 @@ sub dump_config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (scalar @includes > 0) {
|
if (scalar @includes > 0) {
|
||||||
printf ("include:\t"._g("Including configuration file from: ").join (", ", sort @includes)."\n");
|
$plural = ngettext("Including configuration file from:",
|
||||||
|
"Including configuration files from:", scalar @includes);
|
||||||
|
printf ("include:\t%s '%s'\n", $plural, join ("', '", sort @includes));
|
||||||
} else {
|
} else {
|
||||||
printf ("include:\t"._g("No included configuration files.\n"));
|
printf ("include:\t\t"._g("No included configuration files.\n"));
|
||||||
}
|
}
|
||||||
|
undef $plural;
|
||||||
|
print "\n";
|
||||||
# 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 (@check) {
|
foreach my $sect_name (@check) {
|
||||||
printf ("Section:\t$sect_name\n");
|
printf ("Section name:\t$sect_name\n");
|
||||||
print "\tsource: \t$sources{$sect_name}\n";
|
print "\tsource:\t\t$sources{$sect_name}\n";
|
||||||
my @sorted = split(/ /, $packages{$sect_name});
|
my @sorted = split(/ /, $packages{$sect_name});
|
||||||
%uniq=();
|
%uniq=();
|
||||||
foreach my $pkg (@sorted) {
|
foreach my $pkg (@sorted) {
|
||||||
|
@ -971,65 +981,85 @@ sub dump_config {
|
||||||
}
|
}
|
||||||
@sorted = sort keys %uniq;
|
@sorted = sort keys %uniq;
|
||||||
%uniq=();
|
%uniq=();
|
||||||
print "\tsuite: \t$suites{$sect_name}\n" if (not exists $flatfile{$sect_name});
|
print "\tsuite:\t\t$suites{$sect_name}\n" if (not exists $flatfile{$sect_name});
|
||||||
print "\tcomponents:\t$components{$sect_name}\n" if (not exists $flatfile{$sect_name});
|
print "\tcomponents:\t$components{$sect_name}\n" if (not exists $flatfile{$sect_name});
|
||||||
# only packages can have a list
|
# only list packages in a bootstrapping section
|
||||||
next if (not grep(/^$sect_name$/i, @debootstrap));
|
if (not grep(/^$sect_name$/i, @debootstrap)) {
|
||||||
print "\tBootstrap:\tpackages: ".join(" ", @sorted)."\n";
|
printf ("\t%s\n",_g("Not listed as a 'Bootstrap' section."));
|
||||||
|
print "\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
print "\tpackages:\t".join(" ", @sorted)."\n";
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
printf ("Bootstrap:\t%s: %s\n", _g("Sections"), join(" ", sort @debootstrap));
|
$plural = ngettext("Section to install", "Sections to install", scalar @debootstrap);
|
||||||
printf ("AptSources:\t%s: %s\n", _g("Sections"), join(" ", sort @aptsources));
|
printf ("%s:\t%s\n", $plural, join(" ", sort @debootstrap));
|
||||||
|
$plural = ngettext("Section for updates", "Sections for updates", scalar @aptsources);
|
||||||
|
printf ("%s:\t%s\n", $plural, join(" ", sort @aptsources));
|
||||||
my @srcdump=();
|
my @srcdump=();
|
||||||
foreach my $src (sort keys %sources) {
|
foreach my $src (sort keys %sources) {
|
||||||
next if ((!grep(/^$src$/i, @aptsources)) or (!grep(/^$src$/i, @debootstrap)));
|
next if ((!grep(/^$src$/i, @aptsources)) or (!grep(/^$src$/i, @debootstrap)));
|
||||||
push @srcdump, $sources{$src};
|
push @srcdump, $sources{$src};
|
||||||
}
|
}
|
||||||
my $srcmsg="omitdebsrc\t"._g("Omit deb-src from sources.list for sections:");
|
my $srcmsg="omitdebsrc\t\t"._g("Omit deb-src from sources.list for sections:");
|
||||||
foreach my $omit (sort keys %omitdebsrc) {
|
if (scalar keys %omitdebsrc == 0) {
|
||||||
$srcmsg .= $omitdebsrc{$omit} if (defined $omitdebsrc{$omit});
|
$srcmsg .= sprintf(" %s",_g("None."));
|
||||||
|
} else {
|
||||||
|
foreach my $omit (sort keys %omitdebsrc) {
|
||||||
|
$srcmsg .= $omitdebsrc{$omit} if (defined $omitdebsrc{$omit});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "$srcmsg\n";
|
print "$srcmsg\n";
|
||||||
if (defined $explicit_suite) {
|
if (defined $explicit_suite) {
|
||||||
printf("explicitsuite:\t"._g("Explicit suite selection: Yes\n"));
|
printf("explicitsuite:\t\t"._g("Explicit suite selection: Yes\n"));
|
||||||
} else {
|
} else {
|
||||||
printf("explicitsuite:\t"._g("Explicit suite selection: No - let apt use latest.\n"));
|
printf("explicitsuite:\t\t"._g("Explicit suite selection: No - let apt use latest.\n"));
|
||||||
}
|
}
|
||||||
if (defined $allow_recommends) {
|
if (defined $allow_recommends) {
|
||||||
printf("allowrecommends:\t"._g("Recommended packages are added to the selection.\n"));
|
printf("allowrecommends:\t"._g("Recommended packages are added to the selection.\n"));
|
||||||
} else {
|
} else {
|
||||||
printf("allowrecommends:\t"._g("Recommended packages are ignored.\n"));
|
printf("allowrecommends:\t"._g("Recommended packages are ignored.\n"));
|
||||||
}
|
}
|
||||||
print "Extra Packages: ".join (", ", sort @extrapkgs)."\n"
|
$plural = ngettext ("Extra Package: ", "Extra Packages: ", scalar @extrapkgs);
|
||||||
|
print "additional:\t\t$plural".join (", ", sort @extrapkgs)."\n"
|
||||||
if (scalar @extrapkgs > 0);
|
if (scalar @extrapkgs > 0);
|
||||||
print "reinstall: ".join (", ", sort (@reinstall))."\n"
|
print "reinstall:\t\t".join (", ", sort (@reinstall))."\n"
|
||||||
if (scalar @reinstall > 0);
|
if (scalar @reinstall > 0);
|
||||||
if (defined $arch) {
|
if (defined $arch and $arch ne "") {
|
||||||
printf ("arch: \t"._g("Architecture: %s\n"), $arch);
|
printf ("arch:\t\t\t"._g("Architecture to download: %s\n"), $arch);
|
||||||
} else {
|
} else {
|
||||||
$msg .= sprintf(_g("Cannot determine architecture from '%s'.\n"), $file);
|
$msg .= sprintf(_g("Cannot determine architecture from '%s'.\n"), $file);
|
||||||
}
|
}
|
||||||
if (defined $dir) {
|
if (defined $dir and $dir ne "") {
|
||||||
printf ("dir: \t"._g("Output directory: '%s'\n"), $dir);
|
printf ("dir:\t\t\t"._g("Output directory: '%s'\n"), $dir);
|
||||||
} else {
|
} else {
|
||||||
$msg .= sprintf(_g("Cannot determine directory from '%s'.\n"), $file);
|
$msg .= sprintf(_g("Cannot determine directory from '%s'.\n"), $file);
|
||||||
}
|
}
|
||||||
printf ("unpack: \t"._g("extract all downloaded archives: %s\n"), $unpack) if (defined $unpack);
|
printf ("unpack:\t\t\t"._g("extract all downloaded archives: %s\n"), $unpack) if (defined $unpack);
|
||||||
print "configscript:\t$configsh\n" if (defined $configsh);
|
print "configscript:\t\t$configsh\n" if (defined $configsh);
|
||||||
print "setupscript:\t$setupsh\n" if (defined $setupsh);
|
printf ("setupscript:\t\t%s: %s",_g("Script to be run after unpacking"),"$setupsh\n") if (defined $setupsh);
|
||||||
print "omitrequired:\t$omitrequired\n" if (defined $omitrequired);
|
if (defined $omitrequired and $omitrequired ne "false") {
|
||||||
if (defined $tidy) {
|
printf ("omitrequired:\t\t%s\n",_g("'Priority required' packages are not included."));
|
||||||
printf ("cleanup: \t"._g("remove apt cache data: true\n"));
|
|
||||||
} else {
|
} else {
|
||||||
printf ("cleanup: \t"._g("remove apt cache data: false\n"));
|
printf ("omitrequired:\t\t%s\n",_g("'Priority: required' packages are included."));
|
||||||
|
}
|
||||||
|
if (defined $tidy) {
|
||||||
|
printf ("cleanup:\t\t"._g("remove apt cache data: true\n"));
|
||||||
|
} else {
|
||||||
|
printf ("cleanup:\t\t"._g("remove apt cache data: false\n"));
|
||||||
}
|
}
|
||||||
if (defined $noauth) {
|
if (defined $noauth) {
|
||||||
printf ("noauth: \t"._g("allow the use of unauthenticated repositories: true\n"));
|
printf ("noauth:\t\t\t"._g("allow the use of unauthenticated repositories: true\n"));
|
||||||
} else {
|
} else {
|
||||||
printf ("noauth: \t"._g("allow the use of unauthenticated repositories: false\n"));
|
printf ("noauth:\t\t\t"._g("allow the use of unauthenticated repositories: false\n"));
|
||||||
}
|
}
|
||||||
if (defined $sourcedir) {
|
if (defined $sourcedir) {
|
||||||
printf ("retainsources:\t"._g("Sources will be retained in: %s\n"), $sourcedir);
|
printf ("retainsources:\t"._g("Sources will be retained in: %s\n"), $sourcedir);
|
||||||
}
|
}
|
||||||
|
if (defined $tgzname) {
|
||||||
|
printf ("tarballname:\t\t"._g("Tarball name: '%s'\n"), $tgzname);
|
||||||
|
}
|
||||||
|
print "\n";
|
||||||
if (defined $msg) {
|
if (defined $msg) {
|
||||||
warn ("\n$msg\n");
|
warn ("\n$msg\n");
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Reference in a new issue