diff options
author | Julian Andres Klode <jak@debian.org> | 2020-08-04 10:16:36 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2020-08-04 10:16:36 +0000 |
commit | 63c0657ea54c9268bc1855d5eac92bc636532bd6 (patch) | |
tree | 6c92700a54ef51e58c7d6f54a1b4dcbac78e1fab /apt-pkg | |
parent | 11530bab64efd4b4fc46de7833533cea9c69f521 (diff) | |
parent | c19a3276fe7ecfc132e95b0277e9e68ff364dd92 (diff) |
Merge branch 'master' into 'master'
Support marking all newly installed packages as automatically installed
See merge request apt-team/apt!110
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/depcache.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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) |