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
This commit is contained in:
codehelp 2011-08-11 14:18:54 +00:00
parent d906c8e3b6
commit 0c68083a34

View file

@ -25,11 +25,11 @@ use Parse::Debian::Packages;
use POSIX qw(locale_h); use POSIX qw(locale_h);
use Locale::gettext; 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 @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 @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 $type $file $config $tidy $noauth $keyring %keyrings $deflist $cfgdir
@extrapkgs @includes %source $setupsh $configsh $omitrequired $dryrun @extrapkgs @includes %source $setupsh $configsh $omitrequired $dryrun
$omitpreinst @reinstall $tgzname %uniq %required $check @check %uniq $omitpreinst @reinstall $tgzname %uniq %required $check @check %uniq
@ -246,9 +246,9 @@ foreach my $aptsrc (@debootstrap) {
} elsif (-d "${dir}etc/apt/") { } elsif (-d "${dir}etc/apt/") {
open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list") open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list")
or die _g("Cannot open sources list"). $!; or die _g("Cannot open sources list"). $!;
$mirror = $sources{$aptsrc}; my $mirror = $sources{$aptsrc};
$suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; my $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc};
$component = (exists $flatfile{$aptsrc}) ? "" my $component = (exists $flatfile{$aptsrc}) ? ""
: (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; : (defined $components{$aptsrc}) ? $components{$aptsrc} : "main";
if (defined $mirror and defined $suite) { if (defined $mirror and defined $suite) {
print SOURCES "deb $mirror $suite $component\n"; print SOURCES "deb $mirror $suite $component\n";
@ -425,9 +425,9 @@ foreach my $aptsrc (@aptsources) {
} elsif (-d "${dir}etc/apt/") { } elsif (-d "${dir}etc/apt/") {
open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list") open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap-${aptsrc}.list")
or die _g("Cannot open sources list"). $!; or die _g("Cannot open sources list"). $!;
$mirror = $sources{$aptsrc}; my $mirror = $sources{$aptsrc};
$suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc}; my $suite = (exists $flatfile{$aptsrc}) ? "" : $suites{$aptsrc};
$component = (exists $flatfile{$aptsrc}) ? "" my $component = (exists $flatfile{$aptsrc}) ? ""
: (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; : (defined $components{$aptsrc}) ? $components{$aptsrc} : "main";
if (defined $mirror and defined $suite) { if (defined $mirror and defined $suite) {
print SOURCES "deb $mirror $suite $component\n"; print SOURCES "deb $mirror $suite $component\n";