aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/commands/patchspec.py
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2005-12-07 10:06:33 +0000
committerFrederic Lepied <flepied@mandriva.com>2005-12-07 10:06:33 +0000
commit2c78c40c9bfae22d1501022b2e52cf938b5a957e (patch)
tree33a030236dd735f665e7b1ff1a9fba203742ecc0 /RepSys/commands/patchspec.py
parentaa9174bf0cce8d6a3c6e4d9e795be717da184406 (diff)
downloadmgarepo-2c78c40c9bfae22d1501022b2e52cf938b5a957e.tar
mgarepo-2c78c40c9bfae22d1501022b2e52cf938b5a957e.tar.gz
mgarepo-2c78c40c9bfae22d1501022b2e52cf938b5a957e.tar.bz2
mgarepo-2c78c40c9bfae22d1501022b2e52cf938b5a957e.tar.xz
mgarepo-2c78c40c9bfae22d1501022b2e52cf938b5a957e.zip
Diffstat (limited to 'RepSys/commands/patchspec.py')
-rw-r--r--RepSys/commands/patchspec.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/RepSys/commands/patchspec.py b/RepSys/commands/patchspec.py
new file mode 100644
index 0000000..155ff4f
--- /dev/null
+++ b/RepSys/commands/patchspec.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+#
+# This program will try to patch a spec file from a given package url.
+#
+from RepSys import Error
+from RepSys.rpmutil import patch_spec
+from RepSys.command import *
+import getopt
+import sys
+
+HELP = """\
+Usage: repsys patchspec [OPTIONS] REPPKGURL PATCHFILE
+
+Options:
+ -l LOG Use LOG as log message
+ -h Show this message
+
+Examples:
+ repsys patchspec http://repos/svn/cnc/snapshot/foo
+"""
+
+def parse_options():
+ parser = OptionParser(help=HELP)
+ parser.add_option("-l", dest="log", default="")
+ opts, args = parser.parse_args()
+ if len(args) != 2:
+ raise Error, "invalid arguments"
+ opts.pkgdirurl = default_parent(args[0])
+ opts.patchfile = args[1]
+ return opts
+
+def main():
+ do_command(parse_options, patch_spec)
+
+# vim:et:ts=4:sw=4