Fix patch application
This commit is contained in:
@@ -7,14 +7,14 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
def patch_and_filter(dest_dir):
|
def patch_and_filter(dest_dir, relative_patches_dir):
|
||||||
os.chdir(dest_dir)
|
os.chdir(dest_dir)
|
||||||
|
|
||||||
utils.filter_file("build/landmines.py",
|
utils.filter_file("build/landmines.py",
|
||||||
lambda line: not "gyp_environment" in line)
|
lambda line: not "gyp_environment" in line)
|
||||||
utils.commit("filter gyp_environment out of build/landmines.py")
|
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):
|
def patch(dest_dir, relative_patches_dir=os.curdir):
|
||||||
|
|||||||
@@ -128,13 +128,12 @@ def main():
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
patches_dir = os.path.join(args.dest_dir, 'sky', 'tools', 'roll', 'patches')
|
|
||||||
|
|
||||||
if args.mojo_dir:
|
if args.mojo_dir:
|
||||||
rev(args.mojo_dir, args.dest_dir, dirs_from_mojo, 'mojo')
|
rev(args.mojo_dir, args.dest_dir, dirs_from_mojo, 'mojo')
|
||||||
|
|
||||||
try:
|
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:
|
except subprocess.CalledProcessError:
|
||||||
print "ERROR: Roll failed due to a patch not applying"
|
print "ERROR: Roll failed due to a patch not applying"
|
||||||
print "Fix the patch to apply, commit the result, and re-run this script"
|
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')
|
rev(args.chromium_dir, args.dest_dir, dirs_from_chromium, 'chromium')
|
||||||
|
|
||||||
try:
|
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:
|
except subprocess.CalledProcessError:
|
||||||
print "ERROR: Roll failed due to a patch not applying"
|
print "ERROR: Roll failed due to a patch not applying"
|
||||||
print "Fix the patch to apply, commit the result, and re-run this script"
|
print "Fix the patch to apply, commit the result, and re-run this script"
|
||||||
|
|||||||
Reference in New Issue
Block a user