X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6a910c9db4d450241a57f61b2d3d3e302bb9c11c..3c54407f8783d5e27363eabf41dbc3d031526ffe:/apt-pkg/depcache.cc diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 7c09d3a38..ddbd37699 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1257,9 +1257,10 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if(FromUser) { - // Set it to manual if it's a new install or cancelling the - // removal of a garbage package. - if(P.Status == 2 || (!Pkg.CurrentVer().end() && !P.Marked)) + // 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) + // or if we do automatic installation (aptitude never does it) + if(P.Status == 2 || (Pkg->CurrentVer != 0 && (AutoInst == true || P.Marked == false))) P.Flags &= ~Flag::Auto; } else