source: soft/build_system/build_system/repsys/tags/V1_6_11/RepSys/commands/patchspec.py @ 1

Last change on this file since 1 was 1, checked in by fasma, 12 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 799 bytes
Line 
1#!/usr/bin/python
2#
3# This program will try to patch a spec file from a given package url.
4#
5from RepSys import Error
6from RepSys.rpmutil import patch_spec
7from RepSys.command import *
8import getopt
9import sys
10
11HELP = """\
12Usage: repsys patchspec [OPTIONS] REPPKGURL PATCHFILE
13
14Options:
15    -l LOG  Use LOG as log message
16    -h      Show this message
17
18Examples:
19    repsys patchspec http://repos/svn/cnc/snapshot/foo
20"""
21
22def parse_options():
23    parser = OptionParser(help=HELP)
24    parser.add_option("-l", dest="log", default="")
25    opts, args = parser.parse_args()
26    if len(args) != 2:
27        raise Error, "invalid arguments"
28    opts.pkgdirurl = default_parent(args[0])
29    opts.patchfile = args[1]
30    return opts
31
32def main():
33    do_command(parse_options, patch_spec)
34
35# vim:et:ts=4:sw=4
Note: See TracBrowser for help on using the repository browser.