* cmdline/apt-mark:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Jan 2010 16:15:53 +0000 (17:15 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Jan 2010 16:15:53 +0000 (17:15 +0100)
  - merge fix from Gene Cash that supports markauto for
    packages that are not in the extended_states file yet
    (closes: #534920)

cmdline/apt-mark
debian/changelog

index 3a818a3..2326ece 100755 (executable)
@@ -46,11 +46,16 @@ def mark_unmark_automatic(filename, action, pkgs):
                     print "changing %s to %s" % (pkgname,action)
                 newsec = apt_pkg.RewriteSection(tagfile.Section,
                                        [],
-                                       [ ("Auto-Installed",str(action)) ]
-                                       )
+                                       [ ("Auto-Installed",str(action)) ])
+                pkgs.remove(pkgname)
                 outfile.write(newsec+"\n")
             else:
                 outfile.write(str(tagfile.Section)+"\n")
+        if action == 1:
+            for pkgname in pkgs:
+                if options.verbose:
+                    print "changing %s to %s" % (pkgname,action)
+                outfile.write("Package: %s\nAuto-Installed: %d\n\n" % (pkgname, action))
         # all done, rename the tmpfile
         os.chmod(outfile.name, 0644)
         os.rename(outfile.name, STATE_FILE)
index edc3ab9..b89a88b 100644 (file)
@@ -1,15 +1,17 @@
 apt (0.7.25.2) UNRELEASED; urgency=low
 
+  [ Michael Vogt ]
   * apt-pkg/contrib/cdromutl.cc:
     - fix UnmountCdrom() fails, give it a bit more time and try
       the umount again
   * methods/cdrom.cc:
     - fixes in multi cdrom setup code
+  * cmdline/apt-mark:
+    - merge fix from Gene Cash that supports markauto for
+      packages that are not in the extended_states file yet
+      (closes: #534920)
 
- -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 22 Jan 2010 20:06:12 +0100
-
-apt (0.7.25.2) UNRELEASED; urgency=low
-
+  [ David Kalnischkies ]
   * apt-pkg/contrib/fileutl.cc:
     - Fix the newly introduced method GetListOfFilesInDir to not
       accept every file if no extension is enforced