]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.cc
tell the resolver a package is set on hold if it was set by the user
[apt.git] / apt-pkg / edsp.cc
index d72370358a5d858676839e4dc6abbae1ac291360..8bd0c14bb84afba8259dfb34c4f5b5a9394c4d35 100644 (file)
@@ -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]);