diff options
author | Adam Conrad <adconrad@0c3.net> | 2013-01-18 01:09:43 -0700 |
---|---|---|
committer | Adam Conrad <adconrad@0c3.net> | 2013-01-18 01:09:43 -0700 |
commit | 68225779d1337336707c33c0265fc537ae256813 (patch) | |
tree | 6c4174f63b3014622f5b6132890846f5d47f1c29 /apt-pkg/algorithms.cc | |
parent | 0dbd03a21542c03b0d9769787c8f794a697f3097 (diff) |
* Merge from Debian unstable, pulling in new translations and fixes.
* Add linux-headers to /etc/kernel/postinst.d/apt-auto-removal guard.
* Catalan (Jordi Mallach)
* Drop a confusing non-breaking space. Closes: #691024
* Thai (Theppitak Karoonboonyanan). Closes: #691613
* Vietnamese (Trần Ngọc Quân). Closes: #693773
* Fix Plural forms in German, French, Japanese and Portuguese
translations. Thanks to Jakub Wilk for reporting these errors.
* apt-pkg/packagemanager.cc:
- do not do lock-step configuration for a M-A:same package if it isn't
unpacked yet in SmartConfigure and do not unpack a M-A:same package
again in SmartUnPack if we have already configured it (LP: #1062503)
* apt-pkg/depcache.cc:
- don't call MarkInstall with the FromUser flag set for packages
which are dependencies of APT::Never-MarkAuto-Sections matchers
- no mode changes should obviously be ok for pkgDepCache::IsModeChangeOk
* cmdline/apt-get.cc:
- do not call Mark{Install,Delete} from the autoremove code with
the FromUser bit set to avoid modifying the auto-installed bit
* apt-pkg/algorithms.cc:
- ensure pkgProblemResolver calls MarkDelete without FromUser set
so that it can't overrule holds and the protection flag
* change permissions of /var/log/apt/term.log to 0640 (LP: #975199)
* apt-pkg/algorithms.cc:
- fix package-pointer array memory leak in ResolveByKeepInternal()
* Portuguese (Américo Monteiro) (Closes: #686975)
* handle packages without a mandatory architecture (debian-policy §5.3)
by introducing a pseudo-architecture 'none' so that the small group of
users with these packages can get right of them without introducing too
much hassle for other users (Closes: #686346)
* merged the latest debian-sid fixes
Correct fi translation for hash sum mismatches (lp:420403)
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 1b0161ffd..8cd9d4c6e 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -287,13 +287,13 @@ bool pkgApplyStatus(pkgDepCache &Cache) Cache[I].CandidateVerIter(Cache).Downloadable() == true) Cache.MarkInstall(I, true, 0, false); else - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); } break; // This means removal failed case pkgCache::State::HalfInstalled: - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); break; default: @@ -774,7 +774,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) if (WasKept == true) Cache.MarkKeep(Pkg, false, false); else - Cache.MarkDelete(Pkg); + Cache.MarkDelete(Pkg, false, 0, false); return false; } @@ -903,7 +903,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) OldBreaks < Cache.BrokenCount()) { if (OldVer == 0) - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); else Cache.MarkKeep(I, false, false); } @@ -942,7 +942,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) { if (Debug == true) clog << " Or group remove for " << I.FullName(false) << endl; - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); Change = true; } } @@ -1077,7 +1077,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) { if (Debug == true) clog << " Removing " << I.FullName(false) << " rather than change " << Start.TargetPkg().FullName(false) << endl; - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID]) Scores[I->ID] = Scores[Pkg->ID]; } @@ -1166,7 +1166,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) if (Debug == true) clog << " Removing " << I.FullName(false) << " because I can't find " << Start.TargetPkg().FullName(false) << endl; if (InOr == false) - Cache.MarkDelete(I); + Cache.MarkDelete(I, false, 0, false); } Change = true; @@ -1193,7 +1193,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) { if (Debug == true) clog << " Fixing " << I.FullName(false) << " via remove of " << J->Pkg.FullName(false) << endl; - Cache.MarkDelete(J->Pkg); + Cache.MarkDelete(J->Pkg, false, 0, false); } } else @@ -1419,12 +1419,18 @@ bool pkgProblemResolver::ResolveByKeepInternal() continue; // Restart again. - if (K == LastStop) - return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.FullName(false).c_str()); + if (K == LastStop) { + // I is an iterator based off our temporary package list, + // so copy the name we need before deleting the temporary list + std::string const LoopingPackage = I.FullName(false); + delete[] PList; + return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.", LoopingPackage.c_str()); + } LastStop = K; K = PList - 1; - } + } + delete[] PList; return true; } /*}}}*/ |