Commit ec4c0fb6 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Revert "[ios] Add --landmines-path to build/landmines.py script"

This reverts commit aafd725a.

Reason for revert: Breaks downstream checkout.

Original change's description:
> [ios] Add --landmines-path to build/landmines.py script
> 
> Chrome on iOS has some internal landmines and uses a forked version
> of build/landmines.py for that to allow using a separate landmines
> file.
> 
> Add a --landmines-path parameter to build/landmines.py script in
> order to remove the forked version and instead use the shared one.
> 
> Bug: 1033067
> Change-Id: Iac668c5877ae181442078cda7ce8e727f91104b4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283582
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#786218}

TBR=dpranke@google.com,sdefresne@chromium.org

Change-Id: Ic3e9ba6b7b56c4d4fb0ae28a158897d1a593b972
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1033067
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2287302Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786249}
parent e0bc1ffa
...@@ -4094,23 +4094,6 @@ hooks = [ ...@@ -4094,23 +4094,6 @@ hooks = [
'src/build/landmines.py', 'src/build/landmines.py',
], ],
}, },
{
# This clobbers when necessary (based on get_landmines.py). It must be the
# first hook so that other things that get/generate into the output
# directory will not subsequently be clobbered. This script is only run
# for iOS build with src_internal.
'name': 'landmines_ios_internal',
'pattern': '.',
'condition': 'checkout_ios and checkout_src_internal',
'action': [
'python',
'src/build/landmines.py',
'--landmines-scripts',
'ios_internal/build/get_landmines.py',
'--landmines-path',
'ios_internal/.landmines',
],
},
{ {
# Ensure that the DEPS'd "depot_tools" has its self-update capability # Ensure that the DEPS'd "depot_tools" has its self-update capability
# disabled. # disabled.
......
...@@ -55,9 +55,10 @@ def get_build_dir(src_dir): ...@@ -55,9 +55,10 @@ def get_build_dir(src_dir):
return os.path.abspath(os.path.join(src_dir, output_dir)) return os.path.abspath(os.path.join(src_dir, output_dir))
def clobber_if_necessary(new_landmines, src_dir, landmines_path): def clobber_if_necessary(new_landmines, src_dir):
"""Does the work of setting, planting, and triggering landmines.""" """Does the work of setting, planting, and triggering landmines."""
out_dir = get_build_dir(src_dir) out_dir = get_build_dir(src_dir)
landmines_path = os.path.normpath(os.path.join(src_dir, '.landmines'))
try: try:
os.makedirs(out_dir) os.makedirs(out_dir)
except OSError as e: except OSError as e:
...@@ -94,10 +95,6 @@ def process_options(): ...@@ -94,10 +95,6 @@ def process_options():
parser.add_option('-d', '--src-dir', parser.add_option('-d', '--src-dir',
help='Path of the source root dir. Overrides the default location of the ' help='Path of the source root dir. Overrides the default location of the '
'source root dir when calculating the build directory.') 'source root dir when calculating the build directory.')
parser.add_option(
'-l',
'--landmines-path',
help='Path to the landmines file to use (defaults to .landmines)')
parser.add_option('-v', '--verbose', action='store_true', parser.add_option('-v', '--verbose', action='store_true',
default=('LANDMINES_VERBOSE' in os.environ), default=('LANDMINES_VERBOSE' in os.environ),
help=('Emit some extra debugging information (default off). This option ' help=('Emit some extra debugging information (default off). This option '
...@@ -140,12 +137,7 @@ def main(): ...@@ -140,12 +137,7 @@ def main():
universal_newlines=True) universal_newlines=True)
output, _ = proc.communicate() output, _ = proc.communicate()
landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()]) landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
if options.landmines_path: clobber_if_necessary(landmines, options.src_dir)
landmines_path = options.landmines_path
else:
landmines_path = os.path.join(options.src_dir, '.landmines')
clobber_if_necessary(landmines, options.src_dir,
os.path.normpath(landmines_path))
return 0 return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment