summaryrefslogtreecommitdiff
path: root/cmdline/apt-mark
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-mark')
-rwxr-xr-xcmdline/apt-mark7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdline/apt-mark b/cmdline/apt-mark
index 31383d987..c64d4356c 100755
--- a/cmdline/apt-mark
+++ b/cmdline/apt-mark
@@ -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"