diff --git a/pisi/build.py b/pisi/build.py index 661a3220..036e1811 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -494,7 +494,7 @@ class Builder: targetDir=ctx.config.tmp_dir()) ctx.ui.action(_("* Applying patch: %s") % patch.filename) - pisi.util.do_patch(self.srcDir, patchFile, level=patch.level, target=patch.target) + pisi.util.do_patch(self.srcDir, patchFile, level=patch.level) return True def generate_static_package_object(self): diff --git a/pisi/specfile.py b/pisi/specfile.py index ecd63dc7..2c33af68 100644 --- a/pisi/specfile.py +++ b/pisi/specfile.py @@ -67,7 +67,6 @@ class Patch: s_Filename = [autoxml.String, autoxml.mandatory] a_compressionType = [autoxml.String, autoxml.optional] a_level = [autoxml.Integer, autoxml.optional] - a_target = [autoxml.String, autoxml.optional] #FIXME: what's the cleanest way to give a default value for reading level? #def decode_hook(self, node, errs, where): @@ -80,8 +79,6 @@ class Patch: s += ' (' + self.compressionType + ')' if self.level: s += ' level:' + self.level - if self.target: - s += ' target:' + self.target return s diff --git a/pisi/util.py b/pisi/util.py index 1b1e17b0..3620e077 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -479,19 +479,17 @@ def uncompress(patchFile, compressType="gz", targetDir=None): return filePath -def do_patch(sourceDir, patchFile, level = 0, target = ''): +def do_patch(sourceDir, patchFile, level = 0): """Apply given patch to the sourceDir.""" cwd = os.getcwd() os.chdir(sourceDir) if level == None: level = 0 - if target == None: - target = '' check_file(patchFile) - (ret, out, err) = run_batch("patch -p%d %s < %s" % - (level, target, patchFile)) + (ret, out, err) = run_batch("patch -p%d < %s" % + (level, patchFile)) if ret: if out is None and err is None: # Which means stderr and stdout directed so they are None