From 1aa94c0c4c3c66fb5c127fb32388c9c733c72f6e Mon Sep 17 00:00:00 2001 From: codehelp Date: Mon, 5 Apr 2010 19:45:52 +0000 Subject: [PATCH] Fix separation of debootstrap vs aptsources and remove reliance on the section label matching the lists name. git-svn-id: http://emdebian.org/svn/current@7043 563faec7-e20c-0410-992a-a66f704d0ccd --- debian/changelog | 4 +++- em_multistrap | 39 +++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index af99760..6e81a98 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ emdebian-rootfs (2.0.9) unstable; urgency=low * Fix typos in translated strings. * Allow empty keyring values. + * Fix separation of debootstrap vs aptsources and remove reliance on + the section label matching the lists name. - -- Neil Williams Sat, 03 Apr 2010 11:18:53 +0100 + -- Neil Williams Mon, 05 Apr 2010 20:38:52 +0100 emdebian-rootfs (2.0.8) unstable; urgency=low diff --git a/em_multistrap b/em_multistrap index 5f3a6f2..07f6d4a 100755 --- a/em_multistrap +++ b/em_multistrap @@ -176,6 +176,12 @@ system ("mkdir -p ${dir}etc/apt/sources.list.d/") if (not -d "${dir}etc/apt/sources.list.d/"); system ("mkdir -p ${dir}etc/apt/preferences.d/") if (not -d "${dir}etc/apt/preferences.d/"); +system ("mkdir -p ${dir}usr/share/info/dir") + if (not -d "${dir}usr/share/info/dir"); +#system ("mkdir -p ${dir}/usr/share/doc/gcc-4.2-base/") +# if (not -d "${dir}/usr/share/doc/gcc-4.2-base/"); +#system ("touch ${dir}/usr/share/doc/gcc-4.2-base/.copyright"); +#system ("touch ${dir}/usr/share/doc/gcc-4.2-base/#changelog.Debian.gz"); my $msg = sprintf(_g("Unable to create directory '%s'\n"), "${dir}etc/apt/preferences.d/"); die ($msg) if (not -d "${dir}etc/apt/preferences.d/"); @@ -250,7 +256,7 @@ foreach $repo (sort keys %suites) mkdir "$dir/${cachedir}archives/partial"; } } -foreach my $aptsrc (@aptsources) +foreach my $aptsrc (@debootstrap) { if (defined $deflist) { @@ -344,11 +350,33 @@ if (-l "${dir}lib64" ) { printf (_g("\nMultistrap system installed successfully in %s.\n\n"), $dir); } } -exit 0; +unlink ("${dir}etc/apt/sources.list.d/multistrap.sources.list") + if (-f "${dir}etc/apt/sources.list.d/multistrap.sources.list"); +foreach my $aptsrc (@aptsources) +{ + if (defined $deflist) + { + open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap.sources.list") + or die _g("Cannot open sources list"). $!; + print SOURCES $deflist; + close SOURCES; + } + elsif (-d "${dir}etc/apt/") + { + open (SOURCES, ">>${dir}etc/apt/sources.list.d/multistrap.sources.list") + or die _g("Cannot open sources list"). $!; + $mirror = $sources{$aptsrc}; + $suite = $suites{$aptsrc}; + $component = (defined $components{$aptsrc}) ? $components{$aptsrc} : "main"; + print SOURCES<