cleanup removed options
This commit is contained in:
parent
02ea2901e2
commit
3fed02c8ad
5 changed files with 10 additions and 12 deletions
|
|
@ -6760,14 +6760,14 @@ def handle_untag_build(goptions, session, args):
|
||||||
if options.all:
|
if options.all:
|
||||||
builds = []
|
builds = []
|
||||||
for pkg in args[1:]:
|
for pkg in args[1:]:
|
||||||
builds.extend(session.listTagged(args[0], package=pkg, with_owners=False))
|
builds.extend(session.listTagged(args[0], package=pkg))
|
||||||
elif options.non_latest:
|
elif options.non_latest:
|
||||||
if options.force and len(args) == 1:
|
if options.force and len(args) == 1:
|
||||||
tagged = session.listTagged(args[0], with_owners=False)
|
tagged = session.listTagged(args[0])
|
||||||
else:
|
else:
|
||||||
tagged = []
|
tagged = []
|
||||||
for pkg in args[1:]:
|
for pkg in args[1:]:
|
||||||
tagged.extend(session.listTagged(args[0], package=pkg, with_owners=False))
|
tagged.extend(session.listTagged(args[0], package=pkg))
|
||||||
# listTagged orders entries latest first
|
# listTagged orders entries latest first
|
||||||
seen_pkg = {}
|
seen_pkg = {}
|
||||||
builds = []
|
builds = []
|
||||||
|
|
@ -6785,7 +6785,7 @@ def handle_untag_build(goptions, session, args):
|
||||||
tagged = []
|
tagged = []
|
||||||
with session.multicall() as m:
|
with session.multicall() as m:
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
tagged.append(m.listTagged(args[0], package=pkg, with_owners=False))
|
tagged.append(m.listTagged(args[0], package=pkg))
|
||||||
# flatten
|
# flatten
|
||||||
tagged = list(itertools.chain(*[t.result for t in tagged]))
|
tagged = list(itertools.chain(*[t.result for t in tagged]))
|
||||||
idx = dict([(b['nvr'], b) for b in tagged])
|
idx = dict([(b['nvr'], b) for b in tagged])
|
||||||
|
|
|
||||||
|
|
@ -2580,8 +2580,7 @@ def repo_init(tag, task_id=None, with_src=False, with_debuginfo=False, event=Non
|
||||||
latest = not tinfo['extra'].get('repo_include_all', False)
|
latest = not tinfo['extra'].get('repo_include_all', False)
|
||||||
# Note: the repo_include_all option is not recommended for common use
|
# Note: the repo_include_all option is not recommended for common use
|
||||||
# see https://pagure.io/koji/issue/588 for background
|
# see https://pagure.io/koji/issue/588 for background
|
||||||
rpms, builds = readTaggedRPMS(tag_id, event=event_id, inherit=True, latest=latest,
|
rpms, builds = readTaggedRPMS(tag_id, event=event_id, inherit=True, latest=latest)
|
||||||
with_owners=False)
|
|
||||||
groups = readTagGroups(tag_id, event=event_id, inherit=True)
|
groups = readTagGroups(tag_id, event=event_id, inherit=True)
|
||||||
blocks = [pkg for pkg in readPackageList(tag_id, event=event_id, inherit=True,
|
blocks = [pkg for pkg in readPackageList(tag_id, event=event_id, inherit=True,
|
||||||
with_owners=False).values()
|
with_owners=False).values()
|
||||||
|
|
@ -11292,12 +11291,12 @@ class RootExports(object):
|
||||||
task.setPriority(priority, recurse=recurse)
|
task.setPriority(priority, recurse=recurse)
|
||||||
|
|
||||||
def listTagged(self, tag, event=None, inherit=False, prefix=None, latest=False, package=None,
|
def listTagged(self, tag, event=None, inherit=False, prefix=None, latest=False, package=None,
|
||||||
owner=None, type=None, with_owners=True):
|
owner=None, type=None):
|
||||||
"""List builds tagged with tag"""
|
"""List builds tagged with tag"""
|
||||||
# lookup tag id
|
# lookup tag id
|
||||||
tag = get_tag(tag, strict=True, event=event)['id']
|
tag = get_tag(tag, strict=True, event=event)['id']
|
||||||
results = readTaggedBuilds(tag, event, inherit=inherit, latest=latest, package=package,
|
results = readTaggedBuilds(tag, event, inherit=inherit, latest=latest, package=package,
|
||||||
owner=owner, type=type, with_owners=with_owners)
|
owner=owner, type=type)
|
||||||
if prefix:
|
if prefix:
|
||||||
prefix = prefix.lower()
|
prefix = prefix.lower()
|
||||||
results = [build for build in results
|
results = [build for build in results
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,7 @@ def checkForBuilds(session, tag, builds, event, latest=False):
|
||||||
if latest:
|
if latest:
|
||||||
tagged_list = session.getLatestBuilds(tag, event=event, package=build['name'])
|
tagged_list = session.getLatestBuilds(tag, event=event, package=build['name'])
|
||||||
else:
|
else:
|
||||||
tagged_list = session.listTagged(tag, event=event, package=build['name'],
|
tagged_list = session.listTagged(tag, event=event, package=build['name'], inherit=True)
|
||||||
inherit=True, with_owners=False)
|
|
||||||
for tagged in tagged_list:
|
for tagged in tagged_list:
|
||||||
if tagged['version'] == build['version'] and tagged['release'] == build['release']:
|
if tagged['version'] == build['version'] and tagged['release'] == build['release']:
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -626,7 +626,7 @@ def handle_delete(just_salvage=False):
|
||||||
"""
|
"""
|
||||||
print("Getting list of builds in trash...")
|
print("Getting list of builds in trash...")
|
||||||
trashcan_tag = options.trashcan_tag
|
trashcan_tag = options.trashcan_tag
|
||||||
trash = sorted([(b['nvr'], b) for b in session.listTagged(trashcan_tag, with_owners=False)])
|
trash = sorted([(b['nvr'], b) for b in session.listTagged(trashcan_tag)])
|
||||||
print("...got %i builds" % len(trash))
|
print("...got %i builds" % len(trash))
|
||||||
# XXX - it would be better if there were more appropriate server calls for this
|
# XXX - it would be better if there were more appropriate server calls for this
|
||||||
grace_period = options.grace_period
|
grace_period = options.grace_period
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ def clean_empty(tags):
|
||||||
deleted = []
|
deleted = []
|
||||||
session.multicall = True
|
session.multicall = True
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
session.listTagged(tag['id'], with_owners=False)
|
session.listTagged(tag['id'])
|
||||||
for tag, tagged in zip(tags, session.multiCall()):
|
for tag, tagged in zip(tags, session.multiCall()):
|
||||||
if len(tagged[0]) == 0:
|
if len(tagged[0]) == 0:
|
||||||
candidates.append(tag)
|
candidates.append(tag)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue