avoid broken sources lists on bad config

git-svn-id: http://emdebian.org/svn/current@7123 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2010-04-21 14:30:39 +00:00
parent d41bdc76e2
commit cb7d618a9f

View file

@ -260,12 +260,15 @@ foreach my $aptsrc (@debootstrap)
$mirror = $sources{$aptsrc}; $mirror = $sources{$aptsrc};
$suite = $suites{$aptsrc}; $suite = $suites{$aptsrc};
$component = (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; $component = (defined $components{$aptsrc}) ? $components{$aptsrc} : "main";
if (defined $mirror and defined $suite)
{
print SOURCES<<END; print SOURCES<<END;
deb $mirror $suite $component deb $mirror $suite $component
deb-src $mirror $suite $component deb-src $mirror $suite $component
END END
close SOURCES; close SOURCES;
} }
}
} }
my $k; my $k;
foreach my $pkg (values %keyrings) foreach my $pkg (values %keyrings)
@ -398,12 +401,14 @@ foreach my $aptsrc (@aptsources)
$mirror = $sources{$aptsrc}; $mirror = $sources{$aptsrc};
$suite = $suites{$aptsrc}; $suite = $suites{$aptsrc};
$component = (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; $component = (defined $components{$aptsrc}) ? $components{$aptsrc} : "main";
if (defined $mirror and defined $suite)
print SOURCES<<END; print SOURCES<<END;
deb $mirror $suite $component deb $mirror $suite $component
deb-src $mirror $suite $component deb-src $mirror $suite $component
END END
close SOURCES; close SOURCES;
} }
}
} }
# altered the sources, so get apt to update. # altered the sources, so get apt to update.
(not defined $tidy) ? system ("apt-get $config_str update") : &tidy_apt; (not defined $tidy) ? system ("apt-get $config_str update") : &tidy_apt;