Explorar o código

* 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 %!s(int64=16) %!d(string=hai) anos
pai
achega
503a68c63a
Modificáronse 2 ficheiros con 13 adicións e 6 borrados
  1. 7 2
      cmdline/apt-mark
  2. 6 4
      debian/changelog

+ 7 - 2
cmdline/apt-mark

@@ -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)

+ 6 - 4
debian/changelog

@@ -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