aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-02-16 22:11:34 +0100
committerPapoteur <papoteur@mageialinux-online.org>2016-02-16 22:11:34 +0100
commitabfafd0f7843c188583e5c607168320ba2cfbc8b (patch)
treed6c03feb80a966e3cf0b7f8dcd0843f6c9e8e407 /MgaRepo/commands
parentb6670d6d60f46f1bd4ec0ffd7d34af40b09d3699 (diff)
downloadmgarepo-abfafd0f7843c188583e5c607168320ba2cfbc8b.tar
mgarepo-abfafd0f7843c188583e5c607168320ba2cfbc8b.tar.gz
mgarepo-abfafd0f7843c188583e5c607168320ba2cfbc8b.tar.bz2
mgarepo-abfafd0f7843c188583e5c607168320ba2cfbc8b.tar.xz
mgarepo-abfafd0f7843c188583e5c607168320ba2cfbc8b.zip
add command obsolete as new file obsolete.py
Diffstat (limited to 'MgaRepo/commands')
-rw-r--r--MgaRepo/commands/obsolete.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/MgaRepo/commands/obsolete.py b/MgaRepo/commands/obsolete.py
new file mode 100644
index 0000000..d155f39
--- /dev/null
+++ b/MgaRepo/commands/obsolete.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+#
+# This program will try to patch a spec file from a given package url.
+#
+from MgaRepo import Error
+from MgaRepo.rpmutil import obsolete
+from MgaRepo.command import *
+import getopt
+import sys
+
+HELP = """\
+Usage: mgarepo obsolete [Options] PKG
+
+It will move the package to obsolete.
+
+Options:
+ -d The distribution branch to checkout from
+ -m LOG Use LOG as log message
+ -h Show this message
+
+Examples:
+ mgarepo obsoletes foo
+"""
+
+def parse_options():
+ parser = OptionParser(help=HELP)
+ parser.add_option("-m", dest="log", default=None)
+ parser.add_option("--distribution", "-d", dest="distro", default=None)
+ opts, args = parser.parse_args()
+ if len(args) != 1:
+ raise Error("invalid arguments")
+ opts.pkgdirurl = args[0]
+ return opts
+
+def main():
+ do_command(parse_options, obsolete)
+
+# vim:et:ts=4:sw=4