From eac6fe4362b85859e58d10e59ddecfc1ae7bceb4 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Thu, 30 Jul 2015 10:46:31 -0700 Subject: [PATCH] Automatically apply patches for mojo and chromium rolls --- .../roll/{ => patches/chromium}/android_build.patch | 0 .../roll/{ => patches/mojo}/mojo_dart_embedder.patch | 0 engine/src/flutter/sky/tools/roll/roll.py | 11 ++++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) rename engine/src/flutter/sky/tools/roll/{ => patches/chromium}/android_build.patch (100%) rename engine/src/flutter/sky/tools/roll/{ => patches/mojo}/mojo_dart_embedder.patch (100%) diff --git a/engine/src/flutter/sky/tools/roll/android_build.patch b/engine/src/flutter/sky/tools/roll/patches/chromium/android_build.patch similarity index 100% rename from engine/src/flutter/sky/tools/roll/android_build.patch rename to engine/src/flutter/sky/tools/roll/patches/chromium/android_build.patch diff --git a/engine/src/flutter/sky/tools/roll/mojo_dart_embedder.patch b/engine/src/flutter/sky/tools/roll/patches/mojo/mojo_dart_embedder.patch similarity index 100% rename from engine/src/flutter/sky/tools/roll/mojo_dart_embedder.patch rename to engine/src/flutter/sky/tools/roll/patches/mojo/mojo_dart_embedder.patch diff --git a/engine/src/flutter/sky/tools/roll/roll.py b/engine/src/flutter/sky/tools/roll/roll.py index d72b026fb9..282f4aa44f 100755 --- a/engine/src/flutter/sky/tools/roll/roll.py +++ b/engine/src/flutter/sky/tools/roll/roll.py @@ -128,14 +128,23 @@ 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')) + 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" + return 1 + if args.chromium_dir: rev(args.chromium_dir, args.dest_dir, dirs_from_chromium, 'chromium') try: - patch.patch_and_filter(args.dest_dir) + patch.patch_and_filter(os.path.join(patches_dir, '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"