[tor-commits] [tor-messenger-build/master] Get patches to apply

arlo at torproject.org arlo at torproject.org
Thu Oct 12 16:16:14 UTC 2017


commit b1ec6da9e2ee9050c19f90f8f2cf244c61bcfbc2
Author: Arlo Breault <arlolra at gmail.com>
Date:   Thu Oct 12 12:02:22 2017 -0400

    Get patches to apply
    
     * This is a hacky way of getting the `git apply` to work when the
       temporary working directory is a subdirectory of the "basedir",
       as introduced in 4e45b18.
    
     * f79f867 effectively did nothing.
---
 projects/instantbird/build | 4 ++++
 projects/mozilla/build     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/projects/instantbird/build b/projects/instantbird/build
index d9cbdb0..72722b1 100644
--- a/projects/instantbird/build
+++ b/projects/instantbird/build
@@ -91,10 +91,14 @@ fi
   export WIDL_TIME_OVERRIDE="0"
 [% END %]
 
+# Initialize a git repo here so that the patches aren't attempting to apply
+# against basedir, since our temporary working dir is a subdir of it.
+git init
 for patch in $(ls -1 $rootdir/*.patch | sort)
 do
   git apply -p1 < $patch
 done
+rm -rf .git
 
 cp $rootdir/mozconfig-common .mozconfig
 cat $rootdir/[% c('input_files_by_name/mozconfig') %] >> .mozconfig
diff --git a/projects/mozilla/build b/projects/mozilla/build
index d1b26a2..885f1df 100644
--- a/projects/mozilla/build
+++ b/projects/mozilla/build
@@ -4,10 +4,14 @@
 tar xf [% project %]-[% c('version') %].tar.gz
 cd [% project %]-[% c('version') %]
 
+# Initialize a git repo here so that the patches aren't attempting to apply
+# against basedir, since our temporary working dir is a subdir of it.
+git init
 for patch in $(ls -1 $rootdir/*.patch | sort)
 do
   git apply -p1 < $patch
 done
+rm -rf .git
 
 cd ..
 



More information about the tor-commits mailing list