From 0c68083a348f8c9d089e4b7c3a07c61683939df6 Mon Sep 17 00:00:00 2001 From: codehelp Date: Thu, 11 Aug 2011 14:18:54 +0000 Subject: [PATCH] restrict the scope of the flatfile support variables to just the relevant loops. git-svn-id: http://emdebian.org/svn/current@8061 563faec7-e20c-0410-992a-a66f704d0ccd --- multistrap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/multistrap b/multistrap index 937254c..51dc839 100755 --- a/multistrap +++ b/multistrap @@ -25,11 +25,11 @@ use Parse::Debian::Packages; use POSIX qw(locale_h); use Locale::gettext; -use vars qw/ $progname $ourversion $dstrap $extra @aptsources $mirror +use vars qw/ $progname $ourversion $dstrap $extra @aptsources @archives $deb $cachedir $config_str %packages $retval $str $retries - $dir $include $arch $foreign $suite $url $unpack $sourcedir $msg $etcdir + $dir $include $arch $foreign $url $unpack $sourcedir $msg $etcdir @e $sourcesname $libdir $dpkgdir @debootstrap %suites %components $chk - $component $repo @dirs @touch %sources $section %keys $host $key $value + $repo @dirs @touch %sources $section %keys $host $key $value $type $file $config $tidy $noauth $keyring %keyrings $deflist $cfgdir @extrapkgs @includes %source $setupsh $configsh $omitrequired $dryrun $omitpreinst @reinstall $tgzname %uniq %required $check @check %uniq @@ -246,9 +246,9 @@ foreach my $aptsrc (@debootstrap) { } elsif (-d "${dir}etc/apt/") { open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list") or die _g("Cannot open sources list"). $!; - $mirror = $sources{$aptsrc}; - $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; - $component = (exists $flatfile{$aptsrc}) ? "" + my $mirror = $sources{$aptsrc}; + my $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; + my $component = (exists $flatfile{$aptsrc}) ? "" : (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; if (defined $mirror and defined $suite) { print SOURCES "deb $mirror $suite $component\n"; @@ -425,9 +425,9 @@ foreach my $aptsrc (@aptsources) { } elsif (-d "${dir}etc/apt/") { open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list") or die _g("Cannot open sources list"). $!; - $mirror = $sources{$aptsrc}; - $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; - $component = (exists $flatfile{$aptsrc}) ? "" + my $mirror = $sources{$aptsrc}; + my $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; + my $component = (exists $flatfile{$aptsrc}) ? "" : (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; if (defined $mirror and defined $suite) { print SOURCES "deb $mirror $suite $component\n";