summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-30 12:29:52 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-30 12:29:52 +0200
commit927cd722ce0e21c290a00eaa5670f0d41287a7df (patch)
tree3382089c284d47f0971af775ea3ca75c6d44beab /apt-pkg/depcache.cc
parent1497b87da18106b38f004990ca4bf7ee79862b1d (diff)
parent4cb0cd1648e4a2623cb00a11b2db2649e286706d (diff)
* merged fixes from the debian-sid bzr branch:
* Simplified Chinese (Aron Xu). Closes: #594458 * Bulgarian (Damyan Ivanov). Closes: #594627 * Portuguese (Miguel Figueiredo). Closes: #594668 * Korean (Changwoo Ryu). Closes: #594809 * Portuguese (Américo Monteiro) * cmdline/apt-cache.cc: - remove useless GetInitialize method * cmdline/apt-get.cc: - remove direct calls of ReadMainList and use the wrapper instead to protect us from useless re-reads and two-times notice display - remove death code by removing unused GetInitialize * apt-pkg/depcache.cc: - now that apt-get purge works on 'rc' packages let the MarkDelete pass this purge forward to the non-pseudo package for pseudos * apt-pkg/contrib/fileutl.cc: - apply SilentlyIgnore also on files without an extension * apt-pkg/contrib/configuration.cc: - fix autoremove by using correct config-option name and don't make faulty assumptions in error handling (Closes: #594689) * apt-pkg/versionmatch.cc: - let the pin origin actually work as advertised in the manpage which means "" are optional and pinning a local archive does work - even if it is a non-flat archive (Closes: #594435)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 00bf68af1..018b05e65 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1149,7 +1149,7 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
return;
if (DebugMarker == true)
- std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << " FU=" << FromUser << std::endl;
+ std::clog << OutputInDepth(Depth) << (rPurge ? "MarkPurge " : "MarkDelete ") << Pkg << " FU=" << FromUser << std::endl;
RemoveSizes(Pkg);
RemoveStates(Pkg);
@@ -1167,6 +1167,15 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
// if we remove the pseudo package, we also need to remove the "real"
if (Pkg->CurrentVer != 0 && Pkg.CurrentVer().Pseudo() == true)
MarkDelete(Pkg.Group().FindPkg("all"), rPurge, Depth+1, FromUser);
+ else if (rPurge == true && Pkg->CurrentVer == 0 &&
+ Pkg->CurrentState != pkgCache::State::NotInstalled &&
+ strcmp(Pkg.Arch(), "all") != 0)
+ {
+ PkgIterator const allPkg = Pkg.Group().FindPkg("all");
+ if (allPkg.end() == false && allPkg->CurrentVer == 0 &&
+ allPkg->CurrentState != pkgCache::State::NotInstalled)
+ MarkDelete(allPkg, rPurge, Depth+1, FromUser);
+ }
}
/*}}}*/
// DepCache::IsDeleteOk - check if it is ok to remove this package /*{{{*/