From c61c11f3da448dba996d7fba539cfb3f5b9c5019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 1 Sep 2005 20:00:54 +0000 Subject: [PATCH] =?UTF-8?q?Unpack=20etmeden=20=C3=B6nce=20yamalar=20var=20?= =?UTF-8?q?m=C4=B1=20diye=20kontrol=20et,=20eksik=20varsa=20bo=C5=9Funa=20?= =?UTF-8?q?unpack=20etme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/build.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pisi/build.py b/pisi/build.py index bcddb8c3..c0e3caaf 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -145,7 +145,10 @@ class PisiBuild: util.xterm_title(_("Building PISI source package: %s\n") % self.spec.source.name) self.compile_action_script() - + + # check if all patch files exists, if there are missing no need to unpack! + self.patch_exists() + self.fetch_source_archive() self.unpack_source_archive() @@ -260,6 +263,14 @@ class PisiBuild: #TODO: we'll have to do better than plugging a fxn here pass + def patch_exists(self): + files_dir = os.path.abspath(os.path.join(self.pspecDir, + ctx.const.files_dir)) + for patch in self.spec.source.patches: + patchFile = os.path.join(files_dir, patch.filename) + if not os.access(patchFile, os.F_OK): + raise Error(_("Patch file is missing: %s\n") % patch.filename) + def apply_patches(self): files_dir = os.path.abspath(os.path.join(self.pspecDir, ctx.const.files_dir))