summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-03 10:51:55 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-03 10:51:55 +0200
commitcbc702ea5805ba63f6a032d38530879700f4d100 (patch)
tree0c64f8da7a9cea48d3af27f6668ad6fba39b64ac /apt-pkg/edsp.cc
parent741b7da9de1d2ab470728f1e7f38b25e0d6a556c (diff)
tell the resolver a package is set on hold if it was set by the user
to Keep which happens for example if a user decides to "remove" a not installed package to forbid that it's part of the solution
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index d72370358..8bd0c14bb 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -61,7 +61,8 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)
fprintf(output, "Installed: yes\n");
- if (Pkg->SelectedState == pkgCache::State::Hold)
+ if (Pkg->SelectedState == pkgCache::State::Hold ||
+ (Cache[Pkg].Keep() == true && Cache[Pkg].Protect() == true))
fprintf(output, "Hold: yes\n");
fprintf(output, "APT-ID: %d\n", Ver->ID);
fprintf(output, "Priority: %s\n", PrioMap[Ver->Priority]);