Skip to content

Commit aefa76d

Browse files
laumannthesamesam
authored andcommitted
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@laumann.xyz> Part-of: https://codeberg.org/gentoo/gentoolkit/pulls/4 Signed-off-by: Sam James <sam@gentoo.org>
1 parent 2972728 commit aefa76d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

pym/gentoolkit/eclean/search.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,13 @@ def mk_binpkg_key(cpv):
772772
dead_binpkgs.setdefault(location, {})[binpkg_key] = (binpkg_path, debuginfo_path)
773773

774774
try:
775-
for f, paths in bin_dbapi.bintree.invalid_paths.items():
776-
if f in invalid_paths:
777-
invalid_paths[f].extend(paths)
778-
else:
779-
invalid_paths[f] = paths
775+
invalid_paths[location] = bin_dbapi.bintree.invalid_paths
776+
# A little dirty, but it makes the structure of
777+
# invalid_paths match the structure of dead_binpkgs.
778+
for file_ in invalid_paths[location]:
779+
if len(invalid_paths[location][file_]) == 1:
780+
full_path = invalid_paths[location][file_][0]
781+
invalid_paths[location][file_] = (full_path, None)
780782
except AttributeError:
781783
# if bintree.invalid_paths was not initialized, this is a
782784
# hard error and we can just return here

0 commit comments

Comments
 (0)