* 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
This commit is contained in:
codehelp 2009-03-24 13:37:53 +00:00
parent 38e93256e4
commit 49694d5f90

View file

@ -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