summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-10-05 15:21:47 +0200
committerMichael Vogt <mvo@ubuntu.com>2015-10-05 15:21:47 +0200
commit6f2f5f4afa6f628ad3d068e9ba55fc6455eefa12 (patch)
treed360bbbdff678c19142facabc46f30f693fe32e9 /apt-pkg/depcache.cc
parent1f5a2d63b784eb919143d0be3f2dee7ff0bb7e83 (diff)
parent56e47f3111ad714c6506c0d60dccb92cfc9311cb (diff)
Merge branch 'debian/sid' into ubuntu/master
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index dee5318ea..14c709c82 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1103,7 +1103,12 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
if (DebugMarker == true)
std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << " FU=" << FromUser << std::endl;
- DepIterator Dep = P.InstVerIter(*this).DependsList();
+ VerIterator const PV = P.InstVerIter(*this);
+ if (unlikely(PV.end() == true))
+ return false;
+ bool const PinNeverMarkAutoSection = (PV->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", PV.Section()));
+
+ DepIterator Dep = PV.DependsList();
for (; Dep.end() != true;)
{
// Grok or groups
@@ -1226,7 +1231,7 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
continue;
}
// now check if we should consider it a automatic dependency or not
- if(InstPkg->CurrentVer == 0 && P.InstVerIter(*this)->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", P.InstVerIter(*this).Section()))
+ if(InstPkg->CurrentVer == 0 && PinNeverMarkAutoSection)
{
if(DebugAutoInstall == true)
std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct "