From 3e9ab9f0a81155df6a5b734bb5d079800ccd5514 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Jan 2012 22:48:27 +0100 Subject: * apt-pkg/packagemanager.cc: - ignore breaks on not-installed versions while searching for breakage loops as we don't have to avoid them --- apt-pkg/packagemanager.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 349adbe40..dd08a48ad 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -682,7 +682,13 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c VerIterator Ver(Cache,*I); PkgIterator BrokenPkg = Ver.ParentPkg(); VerIterator InstallVer(Cache,Cache[BrokenPkg].InstallVer); - + if (BrokenPkg.CurrentVer() != Ver) + { + if (Debug) + std::clog << OutputInDepth(Depth) << " Ignore not-installed version " << Ver.VerStr() << " of " << Pkg.FullName() << " for " << End << std::endl; + continue; + } + // Check if it needs to be unpacked if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false && List->IsNow(BrokenPkg)) { -- cgit v1.2.3 From 38ff3de6a82c4dc03adcef98919ff6bd6dc1603a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Jan 2012 00:12:17 +0100 Subject: fix typos in comments reported by the lintian in very-picky-modes --- apt-pkg/packagemanager.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index dd08a48ad..c32c73212 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -322,22 +322,22 @@ bool pkgPackageManager::ConfigureAll() only shown when debuging*/ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) { - // If this is true, only check and correct and dependancies without the Loop flag + // If this is true, only check and correct and dependencies without the Loop flag bool PkgLoop = List->IsFlag(Pkg,pkgOrderList::Loop); if (Debug) { VerIterator InstallVer = VerIterator(Cache,Cache[Pkg].InstallVer); clog << OutputInDepth(Depth) << "SmartConfigure " << Pkg.Name() << " (" << InstallVer.VerStr() << ")"; if (PkgLoop) - clog << " (Only Correct Dependancies)"; + clog << " (Only Correct Dependencies)"; clog << endl; } VerIterator const instVer = Cache[Pkg].InstVerIter(Cache); - /* Because of the ordered list, most dependancies should be unpacked, + /* Because of the ordered list, most dependencies should be unpacked, however if there is a loop (A depends on B, B depends on A) this will not - be the case, so check for dependancies before configuring. */ + be the case, so check for dependencies before configuring. */ bool Bad = false; for (DepIterator D = instVer.DependsList(); D.end() == false; ) @@ -424,7 +424,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) if (Start==End) { if (Bad && Debug && List->IsFlag(DepPkg,pkgOrderList::Loop) == false) - std::clog << OutputInDepth(Depth) << "Could not satisfy dependancies for " << Pkg.Name() << std::endl; + std::clog << OutputInDepth(Depth) << "Could not satisfy dependencies for " << Pkg.Name() << std::endl; break; } else { Start++; -- cgit v1.2.3 From aaab10075397cb4f2ec262c5d478f7ea8acd2d23 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Jan 2012 01:02:36 +0100 Subject: fix a few esoteric cppcheck errors/warnings/infos --- apt-pkg/packagemanager.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index c32c73212..a370f15a3 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -529,7 +529,6 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge); - return true; } /*}}}*/ // PM::SmartUnPack - Install helper /*{{{*/ -- cgit v1.2.3