show the default arch in simulate output if not specified in the file.

git-svn-id: http://emdebian.org/svn/current@8064 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2011-08-13 11:13:24 +00:00
parent cb723c94f1
commit e0d01eb2b1

View file

@ -97,7 +97,8 @@ $cfgdir=dirname($file);
cascade($file); cascade($file);
# Translators: fields are programname, version string, include file. # Translators: fields are programname, version string, include file.
printf (_g("%s %s using %s\n"), $progname, $ourversion, $file); printf (_g("%s %s using %s\n"), $progname, $ourversion, $file);
$host = `dpkg --print-architecture`;
chomp($host);
foreach my $inc (@includes) { foreach my $inc (@includes) {
cascade($inc); cascade($inc);
} }
@ -137,8 +138,6 @@ if (not defined $dir or not defined $arch) {
# Translators: fields are: programname, versionstring, configfile. # Translators: fields are: programname, versionstring, configfile.
printf (_g("%s %s using %s\n"), $progname, $ourversion, $file); printf (_g("%s %s using %s\n"), $progname, $ourversion, $file);
$host = `dpkg --print-architecture`;
chomp ($host);
if ((not defined $arch) or ($arch eq "")) { if ((not defined $arch) or ($arch eq "")) {
$arch = $host; $arch = $host;
printf (_g("Defaulting architecture to native: %s\n"),$arch); printf (_g("Defaulting architecture to native: %s\n"),$arch);
@ -1358,7 +1357,7 @@ sub dump_config {
if (defined $arch and $arch ne "") { if (defined $arch and $arch ne "") {
printf ("Architecture:\t\t"._g("Architecture to download: %s\n"), $arch); printf ("Architecture:\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'. Using $host.\n"), $file);
} }
if ($olddpkg != 0) { if ($olddpkg != 0) {
printf "MultiArch:\t\t%s\n",_g("Currently installed dpkg does not support MultiArch."); printf "MultiArch:\t\t%s\n",_g("Currently installed dpkg does not support MultiArch.");