X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/200f8c52f6fb977265e0e9b3cdeb5c3214f80dd3..58d63ae695eb9f979e65fa8c01fa2c34d61e6527:/apt-pkg/algorithms.cc?ds=sidebyside diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 60da32d78..9ca6ca590 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.19 1999/06/28 03:11:24 jgg Exp $ +// $Id: algorithms.cc,v 1.21 1999/07/09 04:11:33 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -33,6 +33,11 @@ pkgSimulate::pkgSimulate(pkgDepCache &Cache) : pkgPackageManager(Cache), { Flags = new unsigned char[Cache.HeaderP->PackageCount]; memset(Flags,0,sizeof(*Flags)*Cache.HeaderP->PackageCount); + + // Fake a filename so as not to activate the media swapping + string Jnk = "SIMULATE"; + for (int I = 0; I != Cache.Head().PackageCount; I++) + FileNames[I] = Jnk; } /*}}}*/ // Simulate::Install - Simulate unpacking of a package /*{{{*/ @@ -120,14 +125,17 @@ bool pkgSimulate::Configure(PkgIterator iPkg) // Simulate::Remove - Simulate the removal of a package /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgSimulate::Remove(PkgIterator iPkg) +bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) { // Adapt the iterator PkgIterator Pkg = Sim.FindPkg(iPkg.Name()); Flags[Pkg->ID] = 3; Sim.MarkDelete(Pkg); - cout << "Remv " << Pkg.Name(); + if (Purge == true) + cout << "Purg " << Pkg.Name(); + else + cout << "Remv " << Pkg.Name(); if (Sim.BrokenCount() != 0) ShortBreaks();