commit: aefa76d836cf54b9b8bb58bdf1c148a927096456 Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz> AuthorDate: Wed Jan 21 12:08:38 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jan 22 01:02:15 2026 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=aefa76d8
eclean-pkg/search: fix structure of invalid_paths It should match the structure of dead_binpkgs as it might get passed to the same functions. Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz> Part-of: https://codeberg.org/gentoo/gentoolkit/pulls/4 Signed-off-by: Sam James <sam <AT> gentoo.org> pym/gentoolkit/eclean/search.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py index 2648a34..7b4be71 100644 --- a/pym/gentoolkit/eclean/search.py +++ b/pym/gentoolkit/eclean/search.py @@ -772,11 +772,13 @@ def findPackages( dead_binpkgs.setdefault(location, {})[binpkg_key] = (binpkg_path, debuginfo_path) try: - for f, paths in bin_dbapi.bintree.invalid_paths.items(): - if f in invalid_paths: - invalid_paths[f].extend(paths) - else: - invalid_paths[f] = paths + invalid_paths[location] = bin_dbapi.bintree.invalid_paths + # A little dirty, but it makes the structure of + # invalid_paths match the structure of dead_binpkgs. + for file_ in invalid_paths[location]: + if len(invalid_paths[location][file_]) == 1: + full_path = invalid_paths[location][file_][0] + invalid_paths[location][file_] = (full_path, None) except AttributeError: # if bintree.invalid_paths was not initialized, this is a # hard error and we can just return here
