From 49694d5f90d97df3c3f615dee0ae26fd73106604 Mon Sep 17 00:00:00 2001 From: codehelp Date: Tue, 24 Mar 2009 13:37:53 +0000 Subject: [PATCH] * Create new multistrap package because em_multistrap does not need Emdebian::Tools or other emdebian-rootfs dependencies. (Closes: #520087) * pbuilder/em_multistrap : ensure /dev and /etc/network/ exist; only install keyring packages if not already installed. git-svn-id: http://emdebian.org/svn/current@5728 563faec7-e20c-0410-992a-a66f704d0ccd --- em_multistrap | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/em_multistrap b/em_multistrap index 2443260..6794afc 100755 --- a/em_multistrap +++ b/em_multistrap @@ -130,6 +130,14 @@ foreach my $file (@touch) { utime(time, time, "${dir}etc/shells") or (open(F, ">${dir}etc/shells") && close F ); +if (not -d "${dir}etc/network") { + mkdir "${dir}etc/network"; +} + +if (not -d "${dir}dev") { + mkdir "${dir}dev"; +} + unlink ("${dir}etc/apt/sources.list.d/multistrap.sources.list") if (-f "${dir}etc/apt/sources.list.d/multistrap.sources.list"); unlink ("${dir}etc/apt/sources.list") @@ -166,8 +174,9 @@ END } } -foreach $keyring (sort values %keyrings) +foreach $keyring (values %keyrings) { + next if not defined ($keyring); my $e=`printenv`; my $str = ($e =~ /\nUSER=root\n/) ? "" : "sudo "; $str = (-f "/usr/bin/sudo") ? "$str" : ""; @@ -191,7 +200,16 @@ $config_str .= " -o Dir::Cache=${dir}${cachedir}"; system ("apt-get $config_str update"); $str = join (' ', values %packages) . " "; chomp($str); -$str .= join (' ', values %keyrings) . " "; +my $k; +foreach my $pkg (values %keyrings) +{ + next if (not defined $pkg); + my $status = `dpkg -s $pkg`; + next if $status =~ /Status: install ok installed/; + $k .= "$pkg "; +} +$k = "" if (not defined $k); +$str .= "$k "; chomp($str); my $required = &get_required_debs; $str .= join (' ', @$required); @@ -438,6 +456,8 @@ directory=/opt/multistrap/ # same as --tidy-up option if set to true cleanup=true # same as --no-auth option if set to true +# keyring packages listed in each debootstrap will +# still be installed. noauth=false # extract all downloaded archives (default is true) unpack=true @@ -509,6 +529,8 @@ Example configuration: # same as --tidy-up option if set to true cleanup=true # same as --no-auth option if set to true + # keyring packages listed in each debootstrap will + # still be installed. noauth=false # extract all downloaded archives (default is true) unpack=true