Skip to content

Commit b747be4

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 <ferringb@gmail.com>
1 parent 89a718b commit b747be4

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
@@ -11,6 +11,7 @@
1111
from snakeoil.mappings import ImmutableDict, OrderedFrozenSet, inject_getitem_as_getattr
1212
from snakeoil.osutils import pjoin
1313
from snakeoil.process.spawn import bash_version
14+
from snakeoil.sequences import stable_unique
1415

1516
from typing import Iterable
1617

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

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

0 commit comments

Comments
 (0)