summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-21 02:02:55 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-21 02:02:55 +0200
commiteeb38a9afa000ca1fbf1a6b4d047d65ecf6d60f5 (patch)
treeb358f4e90d77678cf13738be0afa8647d454c492 /apt-pkg/depcache.cc
parent95689ededb9738b0c4ec6ebf1add3b79595cc39a (diff)
parent320854985be0fe14491385ca349783ab8a9d7797 (diff)
* merged from the auto-mark branch
* uploaded
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index b8c996c58..87443f9f3 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -715,9 +715,18 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser)
// We dont even try to keep virtual packages..
if (Pkg->VersionList == 0)
return;
-
+
+#if 0 // reseting the autoflag here means we lose the
+ // auto-mark information if a user selects a package for removal
+ // but changes his mind then and sets it for keep again
+ // - this makes sense as default when all Garbage dependencies
+ // are automatically marked for removal (as aptitude does).
+ // setting a package for keep then makes it no longer autoinstalled
+ // for all other use-case this action is rather suprising
if(FromUser && !P.Marked)
P.Flags &= ~Flag::Auto;
+#endif
+
RemoveSizes(Pkg);
RemoveStates(Pkg);
@@ -1316,8 +1325,7 @@ bool pkgDepCache::Sweep()
StateCache &state=PkgState[p->ID];
// if it is not marked and it is installed, it's garbage
- if(!state.Marked && (!p.CurrentVer().end() || state.Install()) &&
- !state.Delete())
+ if(!state.Marked && (!p.CurrentVer().end() || state.Install()))
{
state.Garbage=true;
if(_config->FindB("Debug::pkgAutoRemove",false))