Example #1
0
    def apply_patches(self):
        files_dir = os.path.abspath(util.join_path(self.pspecDir, ctx.const.files_dir))

        for patch in self.spec.source.patches:
            patchFile = util.join_path(files_dir, patch.filename)
            if patch.compressionType:
                patchFile = util.uncompress(
                    patchFile, compressType=patch.compressionType, targetDir=ctx.config.tmp_dir()
                )

            ctx.ui.action(_("* Applying patch: %s") % patch.filename)
            util.do_patch(self.srcDir, patchFile, level=patch.level, target=patch.target)
Example #2
0
    def apply_patches(self):
        files_dir = os.path.abspath(util.join_path(self.specdir, ctx.const.files_dir))

        for patch in self.spec.source.patches:
            patchFile = util.join_path(files_dir, patch.filename)
            relativePath = patch.filename
            reverseApply = patch.reverse and patch.reverse.lower() == "true"
            if patch.compressionType:
                patchFile = util.uncompress(
                    patchFile, compressType=patch.compressionType, targetDir=ctx.config.tmp_dir()
                )
                relativePath = relativePath.rsplit(".%s" % patch.compressionType, 1)[0]

            ctx.ui.action(_("Applying patch: %s") % patch.filename)
            util.do_patch(self.pkg_src_dir(), patchFile, level=patch.level, name=relativePath, reverse=reverseApply)
        return True
Example #3
0
    def apply_patches(self):
        files_dir = os.path.abspath(
            util.join_path(self.specdir, ctx.const.files_dir))

        for patch in self.spec.source.patches:
            patchFile = util.join_path(files_dir, patch.filename)
            if patch.compressionType:
                patchFile = util.uncompress(patchFile,
                                            compressType=patch.compressionType,
                                            targetDir=ctx.config.tmp_dir())

            ctx.ui.action(_("* Applying patch: %s") % patch.filename)
            util.do_patch(self.srcDir,
                          patchFile,
                          level=patch.level,
                          target=patch.target)
Example #4
0
    def apply_patches(self):
        files_dir = os.path.abspath(
            util.join_path(self.specdir, ctx.const.files_dir))

        for patch in self.spec.source.patches:
            patchFile = util.join_path(files_dir, patch.filename)
            relativePath = patch.filename
            reverseApply = patch.reverse and patch.reverse.lower() == "true"
            if patch.compressionType:
                patchFile = util.uncompress(patchFile,
                                            compressType=patch.compressionType,
                                            targetDir=ctx.config.tmp_dir())
                relativePath = relativePath.rsplit(
                    ".%s" % patch.compressionType, 1)[0]

            ctx.ui.action(_("Applying patch: %s") % patch.filename)
            util.do_patch(self.pkg_src_dir(),
                          patchFile,
                          level=patch.level,
                          name=relativePath,
                          reverse=reverseApply)
        return True