From: Zac Medico Date: Fri, 3 May 2013 02:21:16 +0000 (-0700) Subject: _getMissingProperties: remove || support X-Git-Tag: v2.2.0_alpha174~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9072a3862dae6d047fdc7b4fc81ac21f539037c5;p=portage.git _getMissingProperties: remove || support PROPERTIES is not allowed to contain ||, according to PMS. --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index f6049de24..96c1734eb 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1950,7 +1950,6 @@ class config(object): properties_str = metadata.get("PROPERTIES", "") properties = set(use_reduce(properties_str, matchall=1, flat=True)) - properties.discard('||') acceptable_properties = set() for x in accept_properties: @@ -1968,40 +1967,8 @@ class config(object): else: use = [] - properties_struct = use_reduce(properties_str, uselist=use, opconvert=True) - return self._getMaskedProperties(properties_struct, acceptable_properties) - - def _getMaskedProperties(self, properties_struct, acceptable_properties): - if not properties_struct: - return [] - if properties_struct[0] == "||": - ret = [] - for element in properties_struct[1:]: - if isinstance(element, list): - if element: - tmp = self._getMaskedProperties( - element, acceptable_properties) - if not tmp: - return [] - ret.extend(tmp) - else: - if element in acceptable_properties: - return[] - ret.append(element) - # Return all masked properties, since we don't know which combination - # (if any) the user will decide to unmask - return ret - - ret = [] - for element in properties_struct: - if isinstance(element, list): - if element: - ret.extend(self._getMaskedProperties(element, - acceptable_properties)) - else: - if element not in acceptable_properties: - ret.append(element) - return ret + return [x for x in use_reduce(properties_str, uselist=use, flat=True) + if x not in acceptable_properties] def _accept_chost(self, cpv, metadata): """