diff options
author | Matt Zimmerman <matt.zimmerman@canonical.com> | 2004-12-13 10:59:20 +0000 |
---|---|---|
committer | Matt Zimmerman <matt.zimmerman@canonical.com> | 2004-12-13 10:59:20 +0000 |
commit | 3826564e07eaffb05eca5af34a0e76f6f161b89c (patch) | |
tree | ef95b63a23cac888d1a7a821bdeccdd809df9272 /apt-pkg/algorithms.cc | |
parent | 7db98ffceda347f0bc457c6bdc4ff33d60e26b18 (diff) |
Merge misc-abi-changes
Patches applied:
* apt@packages.debian.org/apt--misc-abi-changes--0--base-0
tag of apt@packages.debian.org/apt--main--0--patch-16
* apt@packages.debian.org/apt--misc-abi-changes--0--patch-1
Fix apt-get -s remove to not display the candidate version
* apt@packages.debian.org/apt--misc-abi-changes--0--patch-2
Merge from main
* apt@packages.debian.org/apt--misc-abi-changes--0--patch-3
Use pid_t throughout to hold process IDs
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 9b37385bf..479927d65 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -50,26 +50,29 @@ pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache), /*}}}*/ // Simulate::Describe - Describe a package /*{{{*/ // --------------------------------------------------------------------- -/* Parameter Now == true gives both current and available varsion, - Parameter Now == false gives only the available package version */ -void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Now) +/* Parameter Current == true displays the current package version, + Parameter Candidate == true displays the candidate package version */ +void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Current,bool Candidate) { VerIterator Ver(Sim); out << Pkg.Name(); - if (Now == true) + if (Current == true) { Ver = Pkg.CurrentVer(); if (Ver.end() == false) out << " [" << Ver.VerStr() << ']'; } - Ver = Sim[Pkg].CandidateVerIter(Sim); - if (Ver.end() == true) - return; + if (Candidate == true) + { + Ver = Sim[Pkg].CandidateVerIter(Sim); + if (Ver.end() == true) + return; - out << " (" << Ver.VerStr() << ' ' << Ver.RelStr() << ')'; + out << " (" << Ver.VerStr() << ' ' << Ver.RelStr() << ')'; + } } /*}}}*/ // Simulate::Install - Simulate unpacking of a package /*{{{*/ @@ -82,7 +85,7 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) Flags[Pkg->ID] = 1; cout << "Inst "; - Describe(Pkg,cout,true); + Describe(Pkg,cout,true,true); Sim.MarkInstall(Pkg,false); // Look for broken conflicts+predepends. @@ -156,7 +159,7 @@ bool pkgSimulate::Configure(PkgIterator iPkg) else { cout << "Conf "; - Describe(Pkg,cout,false); + Describe(Pkg,cout,false,true); } if (Sim.BrokenCount() != 0) @@ -181,7 +184,7 @@ bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) cout << "Purg "; else cout << "Remv "; - Describe(Pkg,cout,false); + Describe(Pkg,cout,true,false); if (Sim.BrokenCount() != 0) ShortBreaks(); |