diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:13 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:13 +0000 |
commit | d556d1a1cc89e0f99d1b76fd6da72fd0174f5862 (patch) | |
tree | 6b67b2f7bb477d9e6b000059113101fd8695dcef /cmdline | |
parent | 58d63ae695eb9f979e65fa8c01fa2c34d61e6527 (diff) | |
download | apt-d556d1a1cc89e0f99d1b76fd6da72fd0174f5862.tar.gz |
Purge support
Author: jgg
Date: 1999-07-10 04:58:42 GMT
Purge support
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index dc1e89ae5..67352c868 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.68 1999/07/09 04:11:34 jgg Exp $ +// $Id: apt-get.cc,v 1.69 1999/07/10 04:58:42 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -451,7 +451,10 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = { pkgCache::PkgIterator I = Cache->PkgBegin(); for (; I.end() == false; I++) - Cache[I].iFlags |= pkgDepCache::Purge; + { + if (I.Purge() == false && Cache[I].Mode == pkgDepCache::ModeDelete) + Cache->MarkDelete(I,true); + } } bool Fail = false; @@ -863,7 +866,7 @@ bool DoInstall(CommandLine &CmdL) if (Remove == true) { Fix.Remove(Pkg); - Cache->MarkDelete(Pkg); + Cache->MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false)); continue; } @@ -1003,9 +1006,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) // Remove packages if (I->SelectedState == pkgCache::State::DeInstall || I->SelectedState == pkgCache::State::Purge) - Cache->MarkDelete(I); - if (I->SelectedState == pkgCache::State::Purge) - Cache[I].iFlags |= pkgDepCache::Purge; + Cache->MarkDelete(I,I->SelectedState == pkgCache::State::Purge); } /* Resolve any problems that dselect created, allupgrade cannot handle |