From: Michael Vogt Date: Wed, 28 Aug 2013 10:46:49 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/debian/sid' into feature/upgrade-with-new X-Git-Tag: 0.9.12~11^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/dbf8fc0419831c83e83165de8c434782165aa400?hp=-c Merge remote-tracking branch 'upstream/debian/sid' into feature/upgrade-with-new --- dbf8fc0419831c83e83165de8c434782165aa400 diff --combined apt-private/private-cmndline.cc index b30eeffb7,8902f07d5..121d72ede --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@@ -114,7 -114,7 +114,7 @@@ bool addArgumentsAPTConfig(std::vector< bool addArgumentsAPTGet(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade", - "deselect-upgrade", "autoremove")) + "dselect-upgrade", "autoremove")) { addArg(0, "dpkg-progress", "DpkgPM::Progress", 0); addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0); @@@ -125,8 -125,7 +125,8 @@@ addArg(0, "solver", "APT::Solver", CommandLine::HasArg); if (CmdMatches("upgrade")) { - addArg(0, "allow-new", "APT::Get::UpgradeAllowNew", 0); + addArg(0, "new-pkgs", "APT::Get::Upgrade-Allow-New", + CommandLine::Boolean); } } else if (CmdMatches("update")) diff --combined cmdline/apt-get.cc index 392eafe4f,c273dfaaa..3a41b8c1f --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@@ -350,9 -350,6 +350,6 @@@ bool DoMarkAuto(CommandLine &CmdL /* Intelligent upgrader that will install and remove packages at will */ bool DoDistUpgrade(CommandLine &CmdL) { - if (CmdL.FileSize() != 1) - return _error->Error(_("The dist-upgrade command takes no arguments")); - CacheFile Cache; if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; @@@ -365,6 -362,10 +362,10 @@@ return false; } + // parse additional cmdline pkg manipulation switches + if(!DoCacheManipulationFromCommandLine(CmdL, Cache)) + return false; + c0out << _("Done") << endl; return InstallPackages(Cache,true); @@@ -1627,7 -1628,7 +1628,7 @@@ void SigWinch(int bool DoUpgrade(CommandLine &CmdL) { - if (_config->FindB("APT::Get::UpgradeAllowNew", false) == true) + if (_config->FindB("APT::Get::Upgrade-Allow-New", false) == true) return DoUpgradeWithAllowNewPackages(CmdL); else return DoUpgradeNoNewPackages(CmdL);