Browse Source

* apt-pkg/algorithms.cc:
- bugfix in the InstallProcted() code (preserver the auto-install information)
* cmdline/makefile:
- install apt-mark as well

Michael Vogt 20 years ago
parent
commit
c15f569038
2 changed files with 13 additions and 2 deletions
  1. 7 2
      apt-pkg/algorithms.cc
  2. 6 0
      cmdline/makefile

+ 7 - 2
apt-pkg/algorithms.cc

@@ -1229,8 +1229,13 @@ void pkgProblemResolver::InstallProtect()
       {
 	 if ((Flags[I->ID] & ToRemove) == ToRemove)
 	    Cache.MarkDelete(I);
-	 else
-	    Cache.MarkInstall(I, false, 0, false);
+	 else 
+	 {
+	    // preserver the information if the package was auto
+	    // or manual installed
+	    bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto);
+	    Cache.MarkInstall(I, false, 0, !autoInst);
+	 }
       }
    }   
 }

+ 6 - 0
cmdline/makefile

@@ -52,3 +52,9 @@ SOURCE=apt-key
 TO=$(BIN)
 TARGET=program
 include $(COPY_H)
+
+# The apt-mark program
+SOURCE=apt-mark
+TO=$(BIN)
+TARGET=program
+include $(COPY_H)