From d3ca0833690ec26f5ddcb0d3157fc85c69dc8d5e Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Tue, 12 Mar 2024 21:34:51 +0200 Subject: 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 --- src/pkgdev/scripts/pkgdev_tatt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pkgdev/scripts/pkgdev_tatt.py b/src/pkgdev/scripts/pkgdev_tatt.py index 79624cd..ff88d25 100644 --- a/src/pkgdev/scripts/pkgdev_tatt.py +++ b/src/pkgdev/scripts/pkgdev_tatt.py @@ -234,9 +234,9 @@ def _get_bugzilla_packages(namespace): bug = next(iter(nattka_bugzilla.find_bugs(bugs=[namespace.bug]).values())) namespace.keywording = bug.category == BugCategory.KEYWORDREQ repo = namespace.domain.repos["gentoo"].raw_repo - return dict( - match_package_list(repo, bug, only_new=True, filter_arch=[namespace.domain.arch]) - ).keys() + src_repo = namespace.domain.source_repos_raw + for pkg, _ in match_package_list(repo, bug, only_new=True, filter_arch=[namespace.domain.arch]): + yield src_repo.match(pkg.versioned_atom)[0] def _get_cmd_packages(namespace): -- cgit v1.2.3-65-gdbad