diff options
author | Michael Vogt <egon@bottom> | 2006-12-18 12:15:31 +0100 |
---|---|---|
committer | Michael Vogt <egon@bottom> | 2006-12-18 12:15:31 +0100 |
commit | c04a8d16e28bc82a76a31dba23244390a76fbcbb (patch) | |
tree | 011f783118cb0b328264c5b9ed3b25111d4bdac4 /apt-pkg | |
parent | 6ca714d55119e87a01bd475abd08e7212dcafbd0 (diff) | |
parent | c9b320e8c7c37b47aac3c8af6be990c4cded04c9 (diff) |
* apt-pkg/depcache.cc:
- never autoremove Required packages
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/depcache.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 1e4771dda..390d93dc8 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1345,6 +1345,11 @@ bool pkgDepCache::Sweep() { StateCache &state=PkgState[p->ID]; + // skip required packages + if (!p.CurrentVer().end() && + (p.CurrentVer()->Priority == pkgCache::State::Required)) + continue; + // if it is not marked and it is installed, it's garbage if(!state.Marked && (!p.CurrentVer().end() || state.Install())) { |