]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.cc
don't close stdout/stderr if it is also the statusfd
[apt.git] / apt-pkg / edsp.cc
index adb8788b34f6c73c1476bdf4315d740d9b1a8e40..6ce9da784ee9b8d0b923b84b9220fe1569fc8ea2 100644 (file)
@@ -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 (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;
         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;
         req = &inst;
       else
         continue;