[jhbuild] Use absolute path to patch file when running patch (GNOME bug 642155)



commit 610b5f753d5382a56127f209fabd9b337b32c4f8
Author: Craig Keogh <cskeogh adam com au>
Date:   Tue Apr 12 20:12:31 2011 +0930

    Use absolute path to patch file when running patch (GNOME bug 642155)
    
    The patch file can be specified as a relative path. Patch is run with
    modified CWD ('cwd=self.raw_srcdir'), therefore convert path to absolute
    path.  Based on patch by Oliver Gerlich.

 jhbuild/versioncontrol/tarball.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/versioncontrol/tarball.py b/jhbuild/versioncontrol/tarball.py
index a3dcb4e..f9d9333 100644
--- a/jhbuild/versioncontrol/tarball.py
+++ b/jhbuild/versioncontrol/tarball.py
@@ -280,8 +280,9 @@ class TarballBranch(Branch):
                     raise CommandError(_('Failed to find patch: %s') % patch)
 
             buildscript.set_action(_('Applying patch'), self, action_target=patch)
+            # patchfile can be a relative file
             buildscript.execute('patch -p%d < "%s"'
-                                % (patchstrip, patchfile),
+                                % (patchstrip, os.path.abspath(patchfile)),
                                 cwd=self.raw_srcdir)
 
     def _quilt_checkout(self, buildscript):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]