#2380 cli: [list-tags] revert server side pattern change
Closed 3 years ago by mikem. Opened 3 years ago by julian8628.
julian8628/koji issue/2379  into  master

file modified
+7 -11
@@ -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

rebased onto a99f10b

3 years ago

Metadata Update from @julian8628:
- Pull-request tagged with: testing-ready

3 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

3 years ago

pretty please pagure-ci rebuild

3 years ago

Pull-Request has been closed by mikem

3 years ago