@@ -372,6 +372,7 @@ def find_best_match(self, restrict, pkgset: list[package], prefer_semi_stable=Tr
372372 restrict = boolean .AndRestriction (
373373 * restrict ,
374374 packages .PackageRestriction ("properties" , values .ContainmentMatch ("live" , negate = True )),
375+ packages .OrRestriction (* self .options .search_repo .pkg_masks , negate = True ),
375376 )
376377 # prefer using user selected targets
377378 if intersect := tuple (filter (restrict .match , self .targets )):
@@ -464,6 +465,7 @@ def _find_dependencies(self, pkg: package, keywords: set[str]):
464465 def load_targets (self , targets : list [tuple [str , str ]]):
465466 result = []
466467 search_repo = self .options .search_repo
468+ masked = packages .OrRestriction (* self .options .search_repo .pkg_masks )
467469 for _ , target in targets :
468470 try :
469471 pkgset = search_repo .match (target )
@@ -474,6 +476,13 @@ def load_targets(self, targets: list[tuple[str, str]]):
474476 break
475477 else : # no stablereq
476478 continue
479+ if masked .match (target ):
480+ self .err .write (
481+ self .err .fg ("yellow" ),
482+ f"Target { target } is masked, skipping" ,
483+ self .err .reset ,
484+ )
485+ continue
477486 result .append (self .find_best_match ([target ], pkgset , False ))
478487 except (ValueError , IndexError ):
479488 bugs .error (f"Restriction { target } has no match in repository" , status = 3 )
0 commit comments