summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-09 10:56:23 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commit9777639ef84917f37b0c225a99676e3f0f85421a (patch)
tree2cd34690dbd789d1836a1c01df5a570ddc82758e /apt-pkg/edsp.cc
parent188a6fcf4f13df1fd362a0aff27a23493ddd1ec5 (diff)
do not discard new manual-bits while applying EDSP solutions
In private-install.cc we call MarkInstall with FromUser=true, which sets the bit accordingly, but while applying the EDSP solution we call mark install on all packages with FromUser=false, so MarkInstall believes this install is an automatic one and sets it to auto – so that a new package which is explicitely installed via an external solver is marked as auto and is hence also up for garbage collection in a following call. Ideally MarkInstall wouldn't reset it, but the detection is hard to do without regressing in other cases – and ideally ideally MarkInstall wouldn't deal with the autobit at all – so we work around this on the calling side for now.
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 225d86de0..90f20472e 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -343,7 +343,11 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres
pkgCache::VerIterator Ver(Cache.GetCache(), Cache.GetCache().VerP + VerIdx[id]);
Cache.SetCandidateVersion(Ver);
if (type == "Install")
- Cache.MarkInstall(Ver.ParentPkg(), false, 0, false);
+ {
+ pkgCache::PkgIterator const P = Ver.ParentPkg();
+ if (Cache[P].Mode != pkgDepCache::ModeInstall)
+ Cache.MarkInstall(P, false, 0, false);
+ }
else if (type == "Remove")
Cache.MarkDelete(Ver.ParentPkg(), false);
else if (type == "Autoremove") {