relocate the installed check for the system, not the multistrap

git-svn-id: http://emdebian.org/svn/current@5729 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2009-03-24 14:09:55 +00:00
parent 49694d5f90
commit d11580a25f

View file

@ -173,15 +173,21 @@ END
close SOURCES;
}
}
foreach $keyring (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 ";
}
if (defined $k)
{
next if not defined ($keyring);
my $e=`printenv`;
my $str = ($e =~ /\nUSER=root\n/) ? "" : "sudo ";
$str = (-f "/usr/bin/sudo") ? "$str" : "";
print "I: Installing $keyring\n";
system ("$str apt-get install $keyring");
print "I: Installing $k\n";
system ("$str apt-get install $k");
}
$config_str = '';
@ -200,16 +206,7 @@ $config_str .= " -o Dir::Cache=${dir}${cachedir}";
system ("apt-get $config_str update");
$str = join (' ', values %packages) . " ";
chomp($str);
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 ";
$str .= join (' ', values %keyrings) . " ";
chomp($str);
my $required = &get_required_debs;
$str .= join (' ', @$required);