From 88a840788e82289d417983acf4b49f2c2778296d Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 4 Jan 2011 16:15:53 +0000 Subject: fix problem with python threads on 2010.1 --- RepSys/commands/patchspec.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 RepSys/commands/patchspec.py (limited to 'RepSys/commands/patchspec.py') diff --git a/RepSys/commands/patchspec.py b/RepSys/commands/patchspec.py new file mode 100644 index 0000000..9a4881b --- /dev/null +++ b/RepSys/commands/patchspec.py @@ -0,0 +1,38 @@ +#!/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 * +from RepSys.layout import package_url +import getopt +import sys + +HELP = """\ +Usage: repsys patchspec [OPTIONS] REPPKGURL PATCHFILE + +It will try to patch a spec file from a given package url. + +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 = package_url(args[0], mirrored=False) + opts.patchfile = args[1] + return opts + +def main(): + do_command(parse_options, patch_spec) + +# vim:et:ts=4:sw=4 -- cgit v1.2.1