Commits

Michał Górny committed d491a2b

Transform the filtering framework to be gentoopm-compatible.

Now our filters can be used as arguments to .filter().

  • Participants
  • Parent commits f0988ed

Comments (0)

Files changed (2)

File smartliverebuild/core.py

 			getvcs = VCSLoader()
 
 			try:
-				for pkg in pm.installed:
-					if not filt(pkg.key):
-						continue
-
+				for pkg in pm.installed.filter(filt):
 					try:
 						inherits = pkg.metadata['INHERITED'].split()
 

File smartliverebuild/filtering.py

 			self._pmatchers = ()
 		self._default_pass = True
 
-	def __call__(self, cp):
-		""" Execute filtering on CP. """
+	def __call__(self, pkg):
+		""" Execute filtering on a package. """
+		cp = pkg.key
 		r = self._default_pass
 		for m in self._pmatchers:
 			if m.broken: