Change BraveUpdater.app path in local checkout (#29986)
This commit is contained in:
@@ -144,6 +144,7 @@ def AddBraveCredits(root, prune_paths, special_cases, prune_dirs,
|
||||
|
||||
# Dependencies that are already in brave-core, and whose notices
|
||||
# therefore do not need to be repeated.
|
||||
os.path.join('brave', 'third_party', 'updater'),
|
||||
os.path.join('brave', 'vendor', 'omaha', 'omaha', 'third_party',
|
||||
'chrome'),
|
||||
os.path.join('brave', 'vendor', 'omaha', 'third_party', 'libzip'),
|
||||
|
||||
+1
-2
@@ -85,8 +85,7 @@ def DownloadAndUnpack(url, output_dir, path_prefix=None):
|
||||
shutil.rmtree(output_dir, ignore_errors=True)
|
||||
EnsureDirExists(output_dir)
|
||||
if url.endswith('.zip'):
|
||||
assert path_prefix is None
|
||||
extract_zip(tmp_file.name, output_dir)
|
||||
extract_zip(tmp_file.name, output_dir, path_prefix)
|
||||
else:
|
||||
with tarfile.open(tmp_file.name, mode='r:*') as t:
|
||||
members = None
|
||||
|
||||
+12
-3
@@ -107,13 +107,22 @@ def get_lzma_exec():
|
||||
return lzma_exec
|
||||
|
||||
|
||||
def extract_zip(zip_path, destination):
|
||||
def extract_zip(zip_path, destination, path_prefix=None):
|
||||
if sys.platform in ('darwin', 'linux'):
|
||||
# Use the unzip command to properly handle symbolic links.
|
||||
execute(['unzip', zip_path, '-d', destination])
|
||||
args = ['unzip', zip_path]
|
||||
if path_prefix:
|
||||
args.append(path_prefix + '*')
|
||||
args.extend(['-d', destination])
|
||||
execute(args)
|
||||
else:
|
||||
with zipfile.ZipFile(zip_path) as z:
|
||||
z.extractall(destination)
|
||||
members = None
|
||||
if path_prefix is not None:
|
||||
members = [
|
||||
m for m in z.namelist() if m.startswith(path_prefix)
|
||||
]
|
||||
z.extractall(destination, members=members)
|
||||
|
||||
|
||||
def make_zip(zip_file_path, files, dirs):
|
||||
|
||||
Reference in New Issue
Block a user