Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit35c792f

Browse files
committed
cleanup: remove dead keyword incremental pathway.
This is from the bad ole days when const.incrementalwas a thing. I'm not clear when the code became dead,but the incremental logic it was after already existsin the other pathway- it's part of the standard keywordshadowing optimization paths.TL;DR: delete dead code.Signed-off-by: Brian Harring <ferringb@gmail.com>
1 parent8e67a67 commit35c792f

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

‎src/pkgcore/ebuild/domain.py‎

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ def _pkg_filters(self, pkg_accept_keywords=None, pkg_keywords=None):
511511
self._make_keywords_filter(
512512
default_keywords,
513513
accept_keywords,
514-
incremental="package.keywords"inconst.incrementals,
515514
)
516515
]
517516

@@ -555,7 +554,7 @@ def _apply_license_filter(self, master_licenses, pkg, mode):
555554
returnTrue
556555
returnFalse
557556

558-
def_make_keywords_filter(self,default_keys,accept_keywords,incremental=False):
557+
def_make_keywords_filter(self,default_keys,accept_keywords):
559558
"""Generates a restrict that matches iff the keywords are allowed."""
560559
ifnotaccept_keywordsandnotself.profile.keywords:
561560
returnpackages.PackageRestriction(
@@ -573,24 +572,9 @@ def f(r, v):
573572
((packages.AlwaysTrue,default_keys),), (f(*i)foriinaccept_keywords)
574573
)
575574
else:
576-
ifincremental:
577-
f=collapsed_restrict_to_data
578-
else:
579-
f=non_incremental_collapsed_restrict_to_data
580-
data=f(((packages.AlwaysTrue,default_keys),),accept_keywords)
581-
582-
ifincremental:
583-
raiseNotImplementedError(self._incremental_apply_keywords_filter)
584-
else:
585-
f=self._apply_keywords_filter
586-
returndelegate(partial(f,data))
575+
data=non_incremental_collapsed_restrict_to_data(((packages.AlwaysTrue,default_keys),),accept_keywords)
587576

588-
@staticmethod
589-
def_incremental_apply_keywords_filter(data,pkg,mode):
590-
# note we ignore mode; keywords aren't influenced by conditionals.
591-
# note also, we're not using a restriction here. this is faster.
592-
allowed=data.pull_data(pkg)
593-
returnany(Trueforxinpkg.keywordsifxinallowed)
577+
returndelegate(partial(self._apply_keywords_filter,data))
594578

595579
def_apply_keywords_filter(self,data,pkg,mode):
596580
# note we ignore mode; keywords aren't influenced by conditionals.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp