From fb388c2b7d01c98b0456ce97cf163f5394710b10 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 5 Feb 2008 20:53:09 +0000 Subject: Added --strict option to getsrpm + equivalent configuration option This option makes repsys to fail if the revision provided by the user does not contain any changed path inside the package URL. This should prevent mistakes such as submitting update packages using the Cooker URL. --- RepSys/commands/getsrpm.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'RepSys/commands/getsrpm.py') diff --git a/RepSys/commands/getsrpm.py b/RepSys/commands/getsrpm.py index f1ebfe1..f9a63d2 100644 --- a/RepSys/commands/getsrpm.py +++ b/RepSys/commands/getsrpm.py @@ -19,17 +19,18 @@ Usage: repsys getsrpm [OPTIONS] REPPKGURL Generates the source RPM (.srpm) file of a given package. Options: - -c Use files in current/ directory (default) - -p Use files in pristine/ directory - -v VER Use files from the version specified by VER (e.g. 2.2.1-2cl) - -r REV Use files from current directory, in revision REV (e.g. 1001) - -t DIR Put SRPM file in directory DIR when done (default is ".") - -P USER Define the RPM packager inforamtion to USER - -s FILE Run script with "FILE TOPDIR SPECFILE" command - -n Rename the package to include the revision number - -l Use subversion log to build rpm %changelog - -T FILE Template to be used to generate the %changelog - -h Show this message + -c Use files in current/ directory (default) + -p Use files in pristine/ directory + -v VER Use files from the version specified by VER (e.g. 2.2.1-2cl) + -r REV Use files from current directory, in revision REV (e.g. 1001) + -t DIR Put SRPM file in directory DIR when done (default is ".") + -P USER Define the RPM packager inforamtion to USER + -s FILE Run script with "FILE TOPDIR SPECFILE" command + -n Rename the package to include the revision number + -l Use subversion log to build rpm %changelog + -T FILE Template to be used to generate the %changelog + -h Show this message + --strict Check if the given revision contains changes in REPPKGURL Examples: repsys getsrpm python @@ -73,6 +74,8 @@ def parse_options(): parser.add_option("-n", dest="revname", action="store_true") parser.add_option("-l", dest="svnlog", action="store_true") parser.add_option("-T", dest="template", type="string", default=None) + parser.add_option("--strict", dest="strict", default=False, + action="store_true") opts, args = parser.parse_args() del opts.__ignore if len(args) != 1: -- cgit v1.2.1