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:
parent
49694d5f90
commit
d11580a25f
1 changed files with 12 additions and 15 deletions
|
@ -173,15 +173,21 @@ END
|
||||||
close SOURCES;
|
close SOURCES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
my $k;
|
||||||
foreach $keyring (values %keyrings)
|
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 $e=`printenv`;
|
||||||
my $str = ($e =~ /\nUSER=root\n/) ? "" : "sudo ";
|
my $str = ($e =~ /\nUSER=root\n/) ? "" : "sudo ";
|
||||||
$str = (-f "/usr/bin/sudo") ? "$str" : "";
|
$str = (-f "/usr/bin/sudo") ? "$str" : "";
|
||||||
print "I: Installing $keyring\n";
|
print "I: Installing $k\n";
|
||||||
system ("$str apt-get install $keyring");
|
system ("$str apt-get install $k");
|
||||||
}
|
}
|
||||||
|
|
||||||
$config_str = '';
|
$config_str = '';
|
||||||
|
@ -200,16 +206,7 @@ $config_str .= " -o Dir::Cache=${dir}${cachedir}";
|
||||||
system ("apt-get $config_str update");
|
system ("apt-get $config_str update");
|
||||||
$str = join (' ', values %packages) . " ";
|
$str = join (' ', values %packages) . " ";
|
||||||
chomp($str);
|
chomp($str);
|
||||||
my $k;
|
$str .= join (' ', values %keyrings) . " ";
|
||||||
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);
|
chomp($str);
|
||||||
my $required = &get_required_debs;
|
my $required = &get_required_debs;
|
||||||
$str .= join (' ', @$required);
|
$str .= join (' ', @$required);
|
||||||
|
|
Loading…
Reference in a new issue