From: Anas Nashif Date: Sun, 1 Jul 2012 01:17:04 +0000 (-0400) Subject: Fixed messaging and option help and make it more clear. X-Git-Tag: 0.8~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7adfa9f83b52c0a41b553f808b2bc5df4ddf4f5c;p=tools%2Fgbs.git Fixed messaging and option help and make it more clear. --- diff --git a/gitbuildsys/cmd_remotebuild.py b/gitbuildsys/cmd_remotebuild.py index 3ce7e43..6c3f5c9 100644 --- a/gitbuildsys/cmd_remotebuild.py +++ b/gitbuildsys/cmd_remotebuild.py @@ -112,9 +112,11 @@ def do(opts, args): prj = obspkg.ObsProject(target_prj, apiurl = APISERVER, oscrc = oscrcpath) msger.info('checking status of obs project: %s ...' % target_prj) if prj.is_new(): + # FIXME: How do you know that a certain user does not have permission to + # create any project, anywhewre? if opts.target_obsprj and not target_prj.startswith('home:%s:' % USER): - msger.error('no permission to create project %s, only subpackage '\ - 'of home:%s is allowed ' % (target_prj, USER)) + msger.error('no permission to create project %s, only sub projects'\ + 'of home:%s are allowed ' % (target_prj, USER)) msger.info('creating %s for package build ...' % target_prj) prj.branch_from(base_prj) diff --git a/tools/gbs b/tools/gbs index c6c1d41..784ceee 100755 --- a/tools/gbs +++ b/tools/gbs @@ -39,7 +39,7 @@ def handle_project(option, opt_str, value, parser): "start with '-'" % (opt_str, value)) if not re.match(r'^(\w|:|\.|-)+$', value): raise errors.Usage("option %s: invalid project name %s, only word " \ - "character, ':', '.' and '-' supportted" \ + "character, ':', '.' and '-' are supportted" \ % (opt_str, value)) setattr(parser.values, option.dest, value) @@ -137,20 +137,20 @@ class Gbs(cmdln.Cmdln): @cmdln.option('-D', '--dist', default=None, dest='dist', - help='Specify distribution configure file, which should' \ - 'be full path') + help='Specify distribution configuration file, which should' \ + 'be a full path') @cmdln.option('-R', '--repository', action="callback", default=None, type='string', dest='repositories', callback=handle_repository, - help='Specify package repositories, Supported format ' \ - 'is rpm-md') + help='Specify package repositories, Only rpm-md format' \ + 'is supported') @cmdln.option('-B', '--buildroot', default=None, dest='buildroot', - help='Specify build rootdir to setup chroot environment') + help='Specify build root to setup chroot environment') @cmdln.option('-A', '--arch', default=None, dest='arch', @@ -159,7 +159,7 @@ class Gbs(cmdln.Cmdln): action='store_true', default=False, dest='clean', - help='Delete old build root before initializing it') + help='Delete old build root before initialization') @cmdln.option('--noinit', action='store_true', default=False, @@ -175,7 +175,7 @@ class Gbs(cmdln.Cmdln): action="store_true", default=False, dest='incremental', - help='Do incremental build, which need support of spec file,' + help='Do incremental build, which needs support of spec file,' ' and tar ball unpack stage should be enabled with the ' 'condition of RPM macro RSYNCDONE') @cmdln.option('--spec', @@ -222,16 +222,15 @@ class Gbs(cmdln.Cmdln): dest='target_obsprj', type='string', callback=handle_project, - help='OBS target project being used to build package, ' \ - 'use "home::gbs:Tizen:Main" if not specified') + help='OBS project where package will be checked in' \ + '(default: home::gbs:Tizen:Main)') @cmdln.option('-B', '--base-obsprj', action='callback', default=None, dest='base_obsprj', type='string', callback=handle_project, - help='Base OBS project being used to branch from, ' \ - 'use "Tizen:Main" if not specified') + help='OBS project to branch from (default: Tizen:Main)') @cmdln.option('--spec', default=None, dest='spec', @@ -239,7 +238,7 @@ class Gbs(cmdln.Cmdln): @cmdln.option('-c', '--commit', default=None, dest='commit', - help='Specify a commit to build') + help='Specify a commit ID to build') def do_remotebuild(self, subcmd, opts, *args): """${cmd_name}: remote build package