Skip to content

Commit b17c3d5

Browse files
committed
fix: reduce EAPI helpers paths to just what's unique.
The previous code stacked each level of inheritance on, resulting in many duplicates; path look chooses leftmost, thus filter it down so a directory is only listed once, in the order it was first exposed. Signed-off-by: Brian Harring <[email protected]>
1 parent 2e8c66a commit b17c3d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pkgcore/ebuild/eapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from snakeoil.mappings import ImmutableDict, OrderedFrozenSet, inject_getitem_as_getattr
1313
from snakeoil.osutils import pjoin
1414
from snakeoil.process.spawn import bash_version
15+
from snakeoil.sequences import stable_unique
1516

1617
LATEST_PMS_EAPI_VER = "9"
1718

@@ -465,7 +466,7 @@ def helpers(self):
465466
paths[phase].append(dirpath)
466467
else:
467468
raise ValueError(f"unknown phase: {phase!r}")
468-
return ImmutableDict((k, tuple(v)) for k, v in paths.items())
469+
return ImmutableDict((k, tuple(stable_unique(v))) for k, v in paths.items())
469470

470471
@klass.jit_attr
471472
def ebd_env(self):

0 commit comments

Comments
 (0)