Skip to content

Commit

Permalink
Remove --add from select command
Browse files Browse the repository at this point in the history
Fixes #754
  • Loading branch information
coolo committed Jun 3, 2019
1 parent c4a8213 commit dc77a5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
14 changes: 4 additions & 10 deletions osc-staging.py
Expand Up @@ -98,8 +98,6 @@ def clean_args(args):
help='filter request list to only those from a specific staging')
@cmdln.option('-p', '--project', dest='project', metavar='PROJECT',
help='indicate the project on which to operate, default is openSUSE:Factory')
@cmdln.option('--add', dest='add', metavar='PACKAGE',
help='mark additional packages to be checked by repo checker')
@cmdln.option('--force', action='store_true',
help='force action, overruling internal checks (CAUTION)')
@cmdln.option('-o', '--old', action='store_true',
Expand Down Expand Up @@ -350,7 +348,6 @@ def do_staging(self, subcmd, opts, *args):
osc staging list [--supersede]
osc staging lock [-m MESSAGE]
osc staging select [--no-freeze] [--move [--filter-from STAGING]]
[--add PACKAGE]
STAGING REQUEST...
osc staging select [--no-freeze] [--interactive|--non-interactive]
[--filter-by...] [--group-by...]
Expand Down Expand Up @@ -659,13 +656,10 @@ def do_staging(self, subcmd, opts, *args):
.perform(request_ids, no_freeze=opts.no_freeze)
else:
target_project = api.prj_from_short(stagings[0])
if opts.add:
api.mark_additional_packages(target_project, [opts.add])
else:
filter_from = api.prj_from_short(opts.filter_from) if opts.filter_from else None
SelectCommand(api, target_project) \
.perform(requests, opts.move,
filter_from, opts.no_freeze)
filter_from = api.prj_from_short(opts.filter_from) if opts.filter_from else None
SelectCommand(api, target_project) \
.perform(requests, opts.move,
filter_from, opts.no_freeze)
elif cmd == 'cleanup_rings':
CleanupRings(api).perform()
elif cmd == 'ignore':
Expand Down
10 changes: 0 additions & 10 deletions osclib/stagingapi.py
Expand Up @@ -1502,16 +1502,6 @@ def accept_status_comment(self, project, packages):
project, self.project, ', '.join(packages))
CommentAPI(self.apiurl).add_comment(project_name=project, comment=comment)

def mark_additional_packages(self, project, packages):
"""
Adds packages that the repo checker needs to download from staging prj
"""
meta = self.get_prj_pseudometa(project)
additionals = set(meta.get('add_to_repo', []))
additionals.update(packages)
meta['add_to_repo'] = sorted(additionals)
self.set_prj_pseudometa(project, meta)

def get_prj_results(self, prj, arch):
url = self.makeurl(['build', prj, 'standard', arch, "_jobhistory?code=lastfailures"])
results = []
Expand Down

0 comments on commit dc77a5f

Please sign in to comment.