Commit d3f07793 authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Fix duplicate entries in component builds' version manifest.

Specifically, staged files are now ignored regardless of case and
containing directory.

BUG=673900

Change-Id: I72ded358fbde1c525eaec538ebdb184a79b58c6e
Reviewed-on: https://chromium-review.googlesource.com/598091Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491752}
parent 90a73c37
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
""" """
import ConfigParser import ConfigParser
import fnmatch
import glob import glob
import optparse import optparse
import os import os
...@@ -496,11 +497,16 @@ def DoComponentBuildTasks(staging_dir, build_dir, target_arch, ...@@ -496,11 +497,16 @@ def DoComponentBuildTasks(staging_dir, build_dir, target_arch,
# chrome.exe can find them at runtime), except the ones that are already # chrome.exe can find them at runtime), except the ones that are already
# staged (i.e. non-component DLLs). # staged (i.e. non-component DLLs).
build_dlls = ParseDLLsFromDeps(build_dir, chrome_runtime_deps) build_dlls = ParseDLLsFromDeps(build_dir, chrome_runtime_deps)
staged_dll_basenames = [os.path.basename(staged_dll) for staged_dll in \ # Generate a list of relative dll paths that have already been staged into the
glob.glob(os.path.join(version_dir, '*.dll'))] # version directory (i.e., non-component DLLs).
staged_dlls = [os.path.normcase(os.path.relpath(os.path.join(dir, file),
version_dir)) \
for dir, _, files in os.walk(version_dir) \
for file in files if fnmatch.fnmatch(file, '*.dll')]
component_dll_filenames = [] component_dll_filenames = []
for component_dll in [dll for dll in build_dlls if \ for component_dll in [dll for dll in build_dlls if \
os.path.basename(dll) not in staged_dll_basenames]: os.path.normcase(os.path.relpath(dll, build_dir)) \
not in staged_dlls]:
component_dll_name = os.path.basename(component_dll) component_dll_name = os.path.basename(component_dll)
component_dll_filenames.append(component_dll_name) component_dll_filenames.append(component_dll_name)
g_archive_inputs.append(component_dll) g_archive_inputs.append(component_dll)
......
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