Skip to content

Commit d3ca083

Browse files
committed
tatt: fix required_use for packages from bug
When invoked on bug's package list, we use nattka to find matches in the repo. Nattka requires configured repo, which we were passing beforehand. But this results in a case where we have a configured packages, without source ebuild's "required_use" (it was "configured" by the domain). While somewhat ugly, fix it by performing a second iteration, this time over the source repo, and get the expected package object we can use. Signed-off-by: Arthur Zamarin <[email protected]>
1 parent 78cd513 commit d3ca083

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pkgdev/scripts/pkgdev_tatt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ def _get_bugzilla_packages(namespace):
234234
bug = next(iter(nattka_bugzilla.find_bugs(bugs=[namespace.bug]).values()))
235235
namespace.keywording = bug.category == BugCategory.KEYWORDREQ
236236
repo = namespace.domain.repos["gentoo"].raw_repo
237-
return dict(
238-
match_package_list(repo, bug, only_new=True, filter_arch=[namespace.domain.arch])
239-
).keys()
237+
src_repo = namespace.domain.source_repos_raw
238+
for pkg, _ in match_package_list(repo, bug, only_new=True, filter_arch=[namespace.domain.arch]):
239+
yield src_repo.match(pkg.versioned_atom)[0]
240240

241241

242242
def _get_cmd_packages(namespace):

0 commit comments

Comments
 (0)