Beispiel #1
0
 def _collapse_use_dict(self, attr):
     stack = (getattr(x, attr) for x in self.stack)
     d = misc.ChunkedDataDict()
     for mapping in stack:
         d.merge(mapping)
     d.freeze()
     return d
Beispiel #2
0
 def _parse_use(self, data):
     c = misc.ChunkedDataDict()
     neg, pos = split_negations(data)
     if neg or pos:
         c.add_bare_global(neg, pos)
     c.freeze()
     return c
Beispiel #3
0
class EmptyRootNode(ProfileNode):

    __inst_caching__ = True

    parents = ()
    deprecated = None
    pkg_use = masked_use = stable_masked_use = forced_use = stable_forced_use = misc.ChunkedDataDict()
    forced_use.freeze()
    pkg_use_force = pkg_use_mask = ImmutableDict()
    pkg_provided = system = profile_set = ((), ())
Beispiel #4
0
 def pkg_use(self, data):
     c = misc.ChunkedDataDict()
     c.update_from_stream(
         chain.from_iterable(self._parse_package_use(data).values()))
     c.freeze()
     return c