Fix patch application

This commit is contained in:
John McCutchan
2015-07-30 10:57:47 -07:00
parent eac6fe4362
commit de6aa23a93
2 changed files with 6 additions and 6 deletions

View File

@@ -7,14 +7,14 @@ import os
import subprocess
import utils
def patch_and_filter(dest_dir):
def patch_and_filter(dest_dir, relative_patches_dir):
os.chdir(dest_dir)
utils.filter_file("build/landmines.py",
lambda line: not "gyp_environment" in line)
utils.commit("filter gyp_environment out of build/landmines.py")
patch(dest_dir)
patch(dest_dir, relative_patches_dir)
def patch(dest_dir, relative_patches_dir=os.curdir):

View File

@@ -128,13 +128,12 @@ def main():
args = parser.parse_args()
patches_dir = os.path.join(args.dest_dir, 'sky', 'tools', 'roll', 'patches')
if args.mojo_dir:
rev(args.mojo_dir, args.dest_dir, dirs_from_mojo, 'mojo')
try:
patch.patch_and_filter(os.path.join(patches_dir, 'mojo'))
patch.patch_and_filter(args.dest_dir,
os.path.join('patches', 'mojo'))
except subprocess.CalledProcessError:
print "ERROR: Roll failed due to a patch not applying"
print "Fix the patch to apply, commit the result, and re-run this script"
@@ -144,7 +143,8 @@ def main():
rev(args.chromium_dir, args.dest_dir, dirs_from_chromium, 'chromium')
try:
patch.patch_and_filter(os.path.join(patches_dir, 'chromium'))
patch.patch_and_filter(args.dest_dir,
os.path.join('patches', 'chromium'))
except subprocess.CalledProcessError:
print "ERROR: Roll failed due to a patch not applying"
print "Fix the patch to apply, commit the result, and re-run this script"