Ejemplo n.º 1
0
    def update_with_s(self):
        """Add ${:term:`S`} to ebuild if needed."""
        log.debug("Trying to determine ${S}, unpacking...")
        if self.unpacked_dir is None:
            unpacked_dir = PortageUtils.find_s_dir(self['p'], self.options.category)
            if unpacked_dir == "":
                self["s"] = "${WORKDIR}"

            self.unpacked_dir = os.path.join(PortageUtils.get_workdir(self['p'],
                self.options.category), unpacked_dir)

        if self.get('my_p', None):
            self["s"] = "${WORKDIR}/${MY_P}"
        else:
            pass  # ${WORKDIR}/${P}