]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-mark
apt-pkg/cdrom.h: move new member to the end to minimize ABI risk
[apt.git] / cmdline / apt-mark
index 31383d9875be6b07c3b19036f2012d72758b8c4a..c64d4356cc101e3c6dafcc7c0d04f646d7cad9b4 100755 (executable)
@@ -8,7 +8,7 @@ import os.path
 try:
     import apt_pkg
 except ImportError:
-    print "Error importing apt_pkg, is python-apt installed?"
+    print >> sys.stderr, "Error importing apt_pkg, is python-apt installed?"
     sys.exit(1)
     
 actions = { "markauto" : 1,
@@ -68,6 +68,7 @@ if __name__ == "__main__":
     # option parsing
     parser = OptionParser()
     parser.usage = "%prog [options] {markauto|unmarkauto} packages..."
+    parser.epilog = "apt-mark is deprecated, use apt-get markauto/unmarkauto."
     parser.add_option("-f", "--file", action="store", type="string",
                       dest="filename",
                       help="read/write a different file")
@@ -76,6 +77,10 @@ if __name__ == "__main__":
                       help="print verbose status messages to stdout")
     (options, args) = parser.parse_args()
 
+    if not args:
+        parser.print_help()
+        sys.exit(1)
+
     # get the state-file
     if not options.filename:
         STATE_FILE = apt_pkg.config.find_dir("Dir::State") + "extended_states"