summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-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") {