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 {
|
||||
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
|
||||
$setupsh $configsh $omitrequired $omitpreinst @reinstall $tgzname @check
|
||||
$explicit_suite $allow_recommends %omitdebsrc @dsclist %flatfile
|
||||
|
@ -97,7 +97,7 @@ sub main {
|
|||
cascade($file);
|
||||
# Translators: fields are programname, include file.
|
||||
printf (_g("%s using %s\n"), $progname, $file);
|
||||
$host = `dpkg --print-architecture`;
|
||||
my $host = `dpkg --print-architecture`;
|
||||
chomp($host);
|
||||
foreach my $inc (@includes) {
|
||||
cascade($inc);
|
||||
|
@ -805,6 +805,8 @@ sub guard_lib64 {
|
|||
}
|
||||
} elsif (not -d "${dir}lib64") {
|
||||
chdir ("$dir");
|
||||
my $host = `dpkg --print-architecture`;
|
||||
chomp($host);
|
||||
if ($host eq 'i386' and $arch eq 'amd64') {
|
||||
printf (_g("I: Replaced ./lib64 -> /lib symbolic link with new %slib64 directory.\n"), $dir);
|
||||
mkdir_fatal ("${dir}lib64");
|
||||
|
@ -820,6 +822,8 @@ sub check_bin_sh {
|
|||
$dir = shift;
|
||||
my $old = `pwd`;
|
||||
chomp ($old);
|
||||
my $host = `dpkg --print-architecture`;
|
||||
chomp($host);
|
||||
# dash refuses to configure if no existing shell is found.
|
||||
# (always expects a diversion to already exist).
|
||||
# (works OK in subsequent upgrades.) #546528
|
||||
|
@ -1464,6 +1468,8 @@ sub dump_config {
|
|||
if (defined $arch and $arch ne "") {
|
||||
printf ("Architecture:\t\t"._g("Architecture to download: %s\n"), $arch);
|
||||
} else {
|
||||
my $host = `dpkg --print-architecture`;
|
||||
chomp($host);
|
||||
$msg .= sprintf(_g("Cannot determine architecture from '%s'. Using %s.\n"), $file, $host);
|
||||
}
|
||||
if (scalar (@foreignarches) > 0) {
|
||||
|
|
Loading…
Reference in a new issue