Example #1
0
    def __init__(self, parent_repository, pkg, data, cpvstr):
        """
        :param cpvstr: cpv for the new pkg
        :param parent_repository: actual repository that this pkg should
            claim it belongs to
        :param pkg: parent pkg that is generating this pkg
        :param data: mapping of data to push to use in __getattr__ access
        """
        c = CPV.unversioned(cpvstr)
        if c.fullver is None:
            cpvstr = cpvstr + "-" + pkg.fullver

        metadata.package.__init__(self, parent_repository, cpvstr)
        sfunc = object.__setattr__
        sfunc(self, "data", IndeterminantDict(lambda *a: str(), data))
        sfunc(self, "_orig_data", data)
        sfunc(self, "provider", pkg.versioned_atom)
        sfunc(self, "eapi_obj", get_eapi("0"))
Example #2
0
 def _get_metadata(self, pkg):
     return IndeterminantDict(
         partial(
             self._internal_load_key,
             pjoin(self.location, pkg.category,
                   "%s-%s" % (pkg.package, pkg.fullver))))
Example #3
0
 def _get_metadata(self, pkg):
     return IndeterminantDict(self.__pull_metadata)