I found out the hard way that "fedpkg local" will use the first .spec file in the working directory ... also when that is the wrong one. load_spec in /usr/lib/python3.10/site-packages/pyrpkg/__init__.py
load_spec
/usr/lib/python3.10/site-packages/pyrpkg/__init__.py
I don't know exactly how koji and other tools figure out what spec file to use, but when in a directory X, I would expect it to prefer X/X.spec . If not using that, or if there are multiple .spec files and it choose an arbitrary one, it should state that explicitly.
Hi @kiilerix. Thanks for opening the issue. Do you have a repository example where this behaviour happens?
It can happen in any package source repo, if manually creating another spec file (like an empty a.spec) ... but depending on which arbitrary order os.listdir uses.
See proposed fix in https://pagure.io/rpkg/pull-request/592
Commit d0fe161 fixes this pull-request
Metadata Update from @onosek: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @onosek: - Issue set to the milestone: 1.42
Actually, it is fixed in rpkg-1.64 (fedpkg-1.42 was released together with the rpkg).