diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-12-18 11:55:43 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-12-18 11:55:43 +0100 |
commit | c9b320e8c7c37b47aac3c8af6be990c4cded04c9 (patch) | |
tree | 5915bcefab6e12de13f0a2083ae5661cc783341a /apt-pkg | |
parent | 0e4fe941a62583660e966cccf630a8895b9d29bc (diff) |
* apt-pkg/depcache.cc:
- never mark required packages as garbage
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 2bae94026..3dc9bda35 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1273,6 +1273,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())) { |