Remove $host from global variables
This commit is contained in:
parent
cb3d6d4655
commit
59273c1239
1 changed files with 8 additions and 2 deletions
10
multistrap
10
multistrap
|
@ -31,7 +31,7 @@ main();
|
||||||
|
|
||||||
sub main {
|
sub main {
|
||||||
use vars qw/ @aptsources %packages $str $retries $dir $arch $foreign
|
use vars qw/ @aptsources %packages $str $retries $dir $arch $foreign
|
||||||
$unpack $sourcedir @debootstrap %suites %components %sources %keys $host
|
$unpack $sourcedir @debootstrap %suites %components %sources %keys
|
||||||
$preffile $file $tidy $noauth %keyrings $deflist @extrapkgs @includes
|
$preffile $file $tidy $noauth %keyrings $deflist @extrapkgs @includes
|
||||||
$setupsh $configsh $omitrequired $omitpreinst @reinstall $tgzname @check
|
$setupsh $configsh $omitrequired $omitpreinst @reinstall $tgzname @check
|
||||||
$explicit_suite $allow_recommends %omitdebsrc @dsclist %flatfile
|
$explicit_suite $allow_recommends %omitdebsrc @dsclist %flatfile
|
||||||
|
@ -97,7 +97,7 @@ sub main {
|
||||||
cascade($file);
|
cascade($file);
|
||||||
# Translators: fields are programname, include file.
|
# Translators: fields are programname, include file.
|
||||||
printf (_g("%s using %s\n"), $progname, $file);
|
printf (_g("%s using %s\n"), $progname, $file);
|
||||||
$host = `dpkg --print-architecture`;
|
my $host = `dpkg --print-architecture`;
|
||||||
chomp($host);
|
chomp($host);
|
||||||
foreach my $inc (@includes) {
|
foreach my $inc (@includes) {
|
||||||
cascade($inc);
|
cascade($inc);
|
||||||
|
@ -805,6 +805,8 @@ sub guard_lib64 {
|
||||||
}
|
}
|
||||||
} elsif (not -d "${dir}lib64") {
|
} elsif (not -d "${dir}lib64") {
|
||||||
chdir ("$dir");
|
chdir ("$dir");
|
||||||
|
my $host = `dpkg --print-architecture`;
|
||||||
|
chomp($host);
|
||||||
if ($host eq 'i386' and $arch eq 'amd64') {
|
if ($host eq 'i386' and $arch eq 'amd64') {
|
||||||
printf (_g("I: Replaced ./lib64 -> /lib symbolic link with new %slib64 directory.\n"), $dir);
|
printf (_g("I: Replaced ./lib64 -> /lib symbolic link with new %slib64 directory.\n"), $dir);
|
||||||
mkdir_fatal ("${dir}lib64");
|
mkdir_fatal ("${dir}lib64");
|
||||||
|
@ -820,6 +822,8 @@ sub check_bin_sh {
|
||||||
$dir = shift;
|
$dir = shift;
|
||||||
my $old = `pwd`;
|
my $old = `pwd`;
|
||||||
chomp ($old);
|
chomp ($old);
|
||||||
|
my $host = `dpkg --print-architecture`;
|
||||||
|
chomp($host);
|
||||||
# dash refuses to configure if no existing shell is found.
|
# dash refuses to configure if no existing shell is found.
|
||||||
# (always expects a diversion to already exist).
|
# (always expects a diversion to already exist).
|
||||||
# (works OK in subsequent upgrades.) #546528
|
# (works OK in subsequent upgrades.) #546528
|
||||||
|
@ -1464,6 +1468,8 @@ 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 {
|
||||||
|
my $host = `dpkg --print-architecture`;
|
||||||
|
chomp($host);
|
||||||
$msg .= sprintf(_g("Cannot determine architecture from '%s'. Using %s.\n"), $file, $host);
|
$msg .= sprintf(_g("Cannot determine architecture from '%s'. Using %s.\n"), $file, $host);
|
||||||
}
|
}
|
||||||
if (scalar (@foreignarches) > 0) {
|
if (scalar (@foreignarches) > 0) {
|
||||||
|
|
Loading…
Reference in a new issue