diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-03-12 21:34:51 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-03-12 21:34:51 +0200 |
commit | d3ca0833690ec26f5ddcb0d3157fc85c69dc8d5e (patch) | |
tree | b2cb49f783026bf03f2ac0657753d42bc0ef02e2 | |
parent | base-completion: fix missing and error (diff) | |
download | pkgdev-d3ca0833690ec26f5ddcb0d3157fc85c69dc8d5e.tar.gz pkgdev-d3ca0833690ec26f5ddcb0d3157fc85c69dc8d5e.tar.bz2 pkgdev-d3ca0833690ec26f5ddcb0d3157fc85c69dc8d5e.zip |
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 <arthurzam@gentoo.org>
-rw-r--r-- | src/pkgdev/scripts/pkgdev_tatt.py | 6 |
1 files 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): |