* apt-pkg/algorithms.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Sep 2006 17:36:31 +0000 (19:36 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Sep 2006 17:36:31 +0000 (19:36 +0200)
  - bugfix in the InstallProcted() code (preserver the auto-install information)
* cmdline/makefile:
  - install apt-mark as well

apt-pkg/algorithms.cc
cmdline/makefile

index ac9d3be..55f44fb 100644 (file)
@@ -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);
+        }
       }
    }   
 }
index 882a0e1..49035be 100644 (file)
@@ -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)