Skip to content

Commit

Permalink
tatt: fix required_use for packages from bug
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
arthurzam committed Mar 12, 2024
1 parent 78cd513 commit d3ca083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pkgdev/scripts/pkgdev_tatt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d3ca083

Please sign in to comment.