Related: https://pagure.io/koji/issue/934
We probably need a more involved check for the fs. The /mnt/koji directory could exist and not be correct (e.g. not currently mounted on a client). I would also avoid using the word 'mounted' in the error as there are situations where the base dir exists and is not a mount.
/mnt/koji
So perhaps something like:
if options.sigs and options.paths: packages_dir = os.path.join(koji.BASEDIR, 'packages') if not os.path.exists(packages_dir): error("'list-tagged --sigs --paths' requires accessible %s" % packages_dir)
Also, in the --sigs --paths case, we could add a further check like:
@@ -2718,11 +2718,18 @@ def anon_handle_list_tagged(goptions, session, args): rpms, builds = session.listTaggedRPMS(tag, **opts) data = rpms if options.paths: - build_idx = dict([(b['id'], b) for b in builds]) + build_idx = {} + for build in builds: + build_idx[b['id']] = build + builddir = pathinfo.build(build) + if os.path.isdir(builddir): + build['_dir'] = builddir + else: + warn('Build directory not found: %s' % builddir) for rinfo in data: build = build_idx[rinfo['build_id']] - builddir = pathinfo.build(build) - if options.sigs: + builddir = build.get('_dir') + if options.sigs and builddir: sigkey = rinfo['sigkey'] signedpath = os.path.join(builddir, pathinfo.signed(rinfo, sigkey)) if os.path.exists(signedpath):
1 new commit added
additional changes
rebased onto 3cbb285142946f78d5599015a98efd34aaea5b4c
updated
:thumbsup:
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
Metadata Update from @relias-redhat: - Pull-request tagged with: testing-done
rebased onto 08809355fa9e72bf8a9d3fa44366da209214657d
Commit 5de53dbd fixes this pull-request
Pull-Request has been merged by tkopecek
This introduced a regression for the case without --sigs https://pagure.io/koji/issue/3719
--sigs
Related: https://pagure.io/koji/issue/934