Use safe-upgrade with aptitude

This commit is contained in:
Jamie Cameron
2009-10-20 11:53:21 -07:00
parent 5f67cd3637
commit f70e7601d2

View File

@@ -30,7 +30,8 @@ if ($in{'update'}) {
if ($in{'mode'}) {
$opts = $in{'sim'} ? "-s -y -f" : "-y -f";
$cmd = $in{'mode'} == 2 ? "dist-upgrade" : "upgrade";
$cmd = $in{'mode'} == 2 ? "dist-upgrade" :
$apt_get_command =~ /aptitude/ ? "safe-upgrade" : "upgrade";
print "<b>",&text($in{'sim'} ? 'apt_upgradedescsim' : 'apt_upgradedesc', "<tt>$apt_get_command $opts $cmd</tt>"),"</b><p>\n";
print "<pre>";
&additional_log("exec", undef, "$apt_get_command $opts $cmd");