Просмотр исходного кода

* apt-pkg/edsp.cc:
- include reinstall requests and already installed (= protected) packages
in the install-request for external resolvers (Closes: #689331)

David Kalnischkies лет назад: 13
Родитель
Сommit
036eb0127a
2 измененных файлов с 7 добавлено и 2 удалено
  1. 4 2
      apt-pkg/edsp.cc
  2. 3 0
      debian/changelog

+ 4 - 2
apt-pkg/edsp.cc

@@ -214,9 +214,11 @@ bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade,
       if (Progress != NULL && p % 100 == 0)
          Progress->Progress(p);
       string* req;
-      if (Cache[Pkg].Delete() == true)
+      pkgDepCache::StateCache &P = Cache[Pkg];
+      if (P.Delete() == true)
 	 req = &del;
-      else if (Cache[Pkg].NewInstall() == true || Cache[Pkg].Upgrade() == true)
+      else if (P.NewInstall() == true || P.Upgrade() == true || P.ReInstall() == true ||
+	       (P.Mode == pkgDepCache::ModeKeep && (P.iFlags & pkgDepCache::Protected) == pkgDepCache::Protected))
 	 req = &inst;
       else
 	 continue;

+ 3 - 0
debian/changelog

@@ -19,6 +19,9 @@ apt (0.9.7.6) UNRELEASED; urgency=low
       APT::Cache::ShowVersion is true (default: false) as discussed in
       #218995 to help debian-cd fixing #687949. Thanks to Sam Lidder
       for initial patch and Steve McIntyre for nagging and testing!
+  * apt-pkg/edsp.cc:
+    - include reinstall requests and already installed (= protected) packages
+      in the install-request for external resolvers (Closes: #689331)
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 19 Sep 2012 11:29:56 +0200