summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdline/apt-get.cc9
-rw-r--r--debian/changelog1
2 files changed, 7 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index dac0d42a8..6ca9e1402 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -844,9 +844,11 @@ struct TryToRemove {
pkgCacheFile* Cache;
pkgProblemResolver* Fix;
bool FixBroken;
+ bool PurgePkgs;
unsigned long AutoMarkChanged;
- TryToRemove(pkgCacheFile &Cache, pkgProblemResolver &PM) : Cache(&Cache), Fix(&PM) {};
+ TryToRemove(pkgCacheFile &Cache, pkgProblemResolver &PM) : Cache(&Cache), Fix(&PM),
+ PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
void operator() (pkgCache::VerIterator const &Ver)
{
@@ -856,10 +858,11 @@ struct TryToRemove {
Fix->Protect(Pkg);
Fix->Remove(Pkg);
- if (Pkg->CurrentVer == 0)
+ if ((Pkg->CurrentVer == 0 && PurgePkgs == false) ||
+ (PurgePkgs == true && Pkg->CurrentState == pkgCache::State::NotInstalled))
ioprintf(c1out,_("Package %s is not installed, so not removed\n"),Pkg.FullName(true).c_str());
else
- Cache->GetDepCache()->MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false));
+ Cache->GetDepCache()->MarkDelete(Pkg, PurgePkgs);
}
};
/*}}}*/
diff --git a/debian/changelog b/debian/changelog
index 0a6a7a8fa..e7df55743 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,7 @@ apt (0.8.0~pre1) UNRELASED; urgency=low
* cmdline/apt-get.cc:
- let APT::Get::Arch-Only in build-dep default to false again
(Closes: #592628) Thanks Mohamed Amine IL Idrissi for report!
+ - purge packages in 'rc' state, thanks Rogier! (Closes: #150831)
-- David Kalnischkies <kalnischkies@gmail.com> Wed, 11 Aug 2010 19:36:21 +0200