diff --git a/engine/src/flutter/sky/tools/roll/patch.py b/engine/src/flutter/sky/tools/roll/patch.py index 1de370a9a6..fbc2389e26 100755 --- a/engine/src/flutter/sky/tools/roll/patch.py +++ b/engine/src/flutter/sky/tools/roll/patch.py @@ -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): diff --git a/engine/src/flutter/sky/tools/roll/roll.py b/engine/src/flutter/sky/tools/roll/roll.py index 282f4aa44f..a066a7f7bb 100755 --- a/engine/src/flutter/sky/tools/roll/roll.py +++ b/engine/src/flutter/sky/tools/roll/roll.py @@ -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"