]> git.saurik.com Git - apt.git/commitdiff
add new "apt-get upgrade --with-allow-new" option
authorMichael Vogt <mvo@debian.org>
Tue, 27 Aug 2013 12:07:52 +0000 (14:07 +0200)
committerMichael Vogt <mvo@debian.org>
Tue, 27 Aug 2013 12:07:52 +0000 (14:07 +0200)
The --with-allow-new option maps to APT::Get::UpgradeAllowNew and
will allow "apt-get upgrade" to install new packages (but not to
delete existing packages)

apt-private/private-cmndline.cc

index aceb865d578f94e261c97369c31cc858c8f368d9..c0b5a875fa6ee99ad9ed86881891e25bdf4e1c34 100644 (file)
@@ -163,6 +163,9 @@ bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const * const
       addArg('s', "no-act", "APT::Get::Simulate", 0);
    }
 
+   if (CmdMatches("upgrade"))
+      addArg(0, "allow-new", "APT::Get::UpgradeAllowNew", CommandLine::Boolean);
+
    // FIXME: move to the correct command(s)
    addArg('d',"download-only","APT::Get::Download-Only",0);
    addArg('y',"yes","APT::Get::Assume-Yes",0);