diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/gpgv.cc | 3 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 2 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc index d956eaf00..28f3150c3 100644 --- a/apt-pkg/contrib/gpgv.cc +++ b/apt-pkg/contrib/gpgv.cc @@ -251,6 +251,9 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG, setenv("APT_CONFIG", conf.get(), 1); } + // Tell apt-key not to emit warnings + setenv("APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE", "1", 1); + if (releaseSignature == DETACHED) { auto detached = make_unique_FILE(FileGPG, "r"); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 972472986..bd4856526 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1771,7 +1771,7 @@ URI::operator string() { // FIXME: Technically userinfo is permitted even less // characters than these, but this is not conveniently - // expressed with a blacklist. + // expressed with a denylist. Res << QuoteString(User, ":/?#[]@"); if (Password.empty() == false) Res << ":" << QuoteString(Password, ":/?#[]@"); diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 817d9de3c..c7ef7a400 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1156,6 +1156,7 @@ struct CompareProviders /*{{{*/ /*}}}*/ bool pkgDepCache::MarkInstall_StateChange(pkgCache::PkgIterator const &Pkg, bool AutoInst, bool FromUser) /*{{{*/ { + bool AlwaysMarkAsAuto = _config->FindB("APT::Get::Mark-Auto", false) == true; auto &P = (*this)[Pkg]; if (P.Protect() && P.InstallVer == P.CandidateVer) return true; @@ -1171,7 +1172,7 @@ bool pkgDepCache::MarkInstall_StateChange(pkgCache::PkgIterator const &Pkg, bool P.Mode = pkgDepCache::ModeInstall; P.InstallVer = P.CandidateVer; - if(FromUser) + if(FromUser && !AlwaysMarkAsAuto) { // Set it to manual if it's a new install or already installed, // but only if its not marked by the autoremover (aptitude depend on this behavior) |