1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

- avoid unwanted entire project rebuilds

This commit is contained in:
Adrian Schröter 2011-02-22 22:44:04 +01:00
parent 83cadd7157
commit 87d95409ec
2 changed files with 11 additions and 0 deletions

1
NEWS
View File

@ -12,6 +12,7 @@
- add "request supersede" and "review supersede" to supersede with existing request
- make it possible to run single source services, even when not specified in _service file.
(For example for doing a version update without creating a _service file: osc service lr update_source)
- protect rebuild and abortbuild commands with required "--all" option to mass failures by accident (similar to wipebinaries)
#
# Features which requires OBS 2.2
#

View File

@ -4753,6 +4753,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='trigger rebuilds for a specific repository')
@cmdln.option('-f', '--failed', action='store_true',
help='rebuild all failed packages')
@cmdln.option('--all', action='store_true',
help='Rebuild all packages of entire project')
@cmdln.alias('rebuildpac')
def do_rebuild(self, subcmd, opts, *args):
"""${cmd_name}: Trigger package rebuilds
@ -4805,6 +4807,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if opts.failed:
code = 'failed'
if not (opts.all or package or repo or arch or code):
raise oscerr.WrongOptions('No option has been provided. If you want to rebuild all packages of the entire project, use --all option.')
print rebuild(apiurl, project, package, repo, arch, code)
@ -4829,6 +4834,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='Abort builds for a specific architecture')
@cmdln.option('-r', '--repo', metavar='REPO',
help='Abort builds for a specific repository')
@cmdln.option('--all', action='store_true',
help='Abort all running builds of entire project')
def do_abortbuild(self, subcmd, opts, *args):
"""${cmd_name}: Aborts the build of a certain project/package
@ -4849,6 +4856,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
package = None
if not (opts.all or package or repo or arch):
raise oscerr.WrongOptions('No option has been provided. If you want to abort all packages of the entire project, use --all option.')
print abortbuild(apiurl, args[0], package, opts.arch, opts.repo)