| |
@@ -4114,17 +4114,7 @@
|
| |
if not buildinfo:
|
| |
parser.error(_("Invalid build %s" % options.build))
|
| |
|
| |
- if not args:
|
| |
- # list everything if no pattern is supplied
|
| |
- args = [None]
|
| |
-
|
| |
- tags = []
|
| |
- with session.multicall() as m:
|
| |
- for arg in args:
|
| |
- tags.append(m.listTags(build=buildinfo.get('id', None),
|
| |
- package=pkginfo.get('id', None),
|
| |
- pattern=arg))
|
| |
- tags = list(itertools.chain(*[t.result for t in tags]))
|
| |
+ tags = session.listTags(buildinfo.get('id', None), pkginfo.get('id', None))
|
| |
tags.sort(key=lambda x: x['name'])
|
| |
# if options.verbose:
|
| |
# fmt = "%(name)s [%(id)i] %(perm)s %(locked)s %(arches)s"
|
| |
@@ -4133,6 +4123,12 @@
|
| |
else:
|
| |
fmt = "%(name)s"
|
| |
for tag in tags:
|
| |
+ if args:
|
| |
+ for pattern in args:
|
| |
+ if fnmatch.fnmatch(tag['name'], pattern):
|
| |
+ break
|
| |
+ else:
|
| |
+ continue
|
| |
if options.unlocked:
|
| |
if tag['locked'] or tag['perm']:
|
| |
continue
|
| |
fixes: #2379
related: #2320