diff options
Diffstat (limited to 'apt-private/private-cmndline.cc')
-rw-r--r-- | apt-private/private-cmndline.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index de3992a00..2ecc47ba4 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -3,21 +3,21 @@ #include <apt-pkg/cmndline.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> -#include <apt-pkg/pkgsystem.h> #include <apt-pkg/init.h> -#include <apt-pkg/error.h> +#include <apt-pkg/pkgsystem.h> #include <apt-pkg/strutl.h> #include <apt-private/private-cmndline.h> #include <apt-private/private-main.h> #include <stdarg.h> -#include <string.h> #include <stdlib.h> +#include <string.h> -#include <vector> #include <iomanip> +#include <vector> #include <apti18n.h> /*}}}*/ @@ -203,6 +203,15 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const else if (CmdMatches("update")) { addArg(0, "list-cleanup", "APT::Get::List-Cleanup", 0); + addArg(0, "allow-insecure-repositories", "Acquire::AllowInsecureRepositories", 0); + addArg(0, "allow-weak-repositories", "Acquire::AllowWeakRepositories", 0); + addArg(0, "allow-releaseinfo-change", "Acquire::AllowReleaseInfoChange", 0); + addArg(0, "allow-releaseinfo-change-origin", "Acquire::AllowReleaseInfoChange::Origin", 0); + addArg(0, "allow-releaseinfo-change-label", "Acquire::AllowReleaseInfoChange::Label", 0); + addArg(0, "allow-releaseinfo-change-version", "Acquire::AllowReleaseInfoChange::Version", 0); + addArg(0, "allow-releaseinfo-change-codename", "Acquire::AllowReleaseInfoChange::Codename", 0); + addArg(0, "allow-releaseinfo-change-suite", "Acquire::AllowReleaseInfoChange::Suite", 0); + addArg(0, "allow-releaseinfo-change-defaultpin", "Acquire::AllowReleaseInfoChange::DefaultPin", 0); } else if (CmdMatches("source")) { @@ -273,8 +282,6 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const addArg(0,"remove","APT::Get::Remove",0); addArg(0,"only-source","APT::Get::Only-Source",0); addArg(0,"allow-unauthenticated","APT::Get::AllowUnauthenticated",0); - addArg(0,"allow-insecure-repositories","Acquire::AllowInsecureRepositories",0); - addArg(0,"allow-weak-repositories","Acquire::AllowWeakRepositories",0); addArg(0,"install-recommends","APT::Install-Recommends",CommandLine::Boolean); addArg(0,"install-suggests","APT::Install-Suggests",CommandLine::Boolean); addArg(0,"fix-policy","APT::Get::Fix-Policy-Broken",0); @@ -462,9 +469,8 @@ static void BinarySpecificConfiguration(char const * const Binary) /*{{{*/ _config->CndSet("Binary::apt::APT::Cmd::Show-Update-Stats", true); _config->CndSet("Binary::apt::DPkg::Progress-Fancy", true); _config->CndSet("Binary::apt::APT::Keep-Downloaded-Packages", false); + _config->CndSet("Binary::apt::APT::Get::Update::InteractiveReleaseInfoChanges", true); } - if (binary == "apt-config") - _config->CndSet("Binary::apt-get::Acquire::AllowInsecureRepositories", true); _config->Set("Binary", binary); } @@ -472,8 +478,6 @@ static void BinarySpecificConfiguration(char const * const Binary) /*{{{*/ static void BinaryCommandSpecificConfiguration(char const * const Binary, char const * const Cmd)/*{{{*/ { std::string const binary = flNotDir(Binary); - if (binary == "apt-get" && CmdMatches("update")) - _config->CndSet("Binary::apt-get::Acquire::AllowInsecureRepositories", true); if ((binary == "apt" || binary == "apt-get") && CmdMatches("upgrade", "dist-upgrade", "full-upgrade")) { //FIXME: the option is documented to apply only for install/remove, so |