Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11089)

Unified Diff: chrome/tools/build/win/create_installer_archive.py

Issue 1893823002: Fix mini_installer archive paths with gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/win/create_installer_archive.py
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py
index bf1f089b905571bcc911530cb35b04e7da24d6da..f658ec497ba1e3687e975c67d912a303606f6c46 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -249,11 +249,16 @@ def CreateArchiveFile(options, staging_dir, current_version, prev_version):
': \\\n')
f.write(' ' + ' \\\n '.join(path_fixup(x) for x in g_archive_inputs))
+ # It is important to use abspath to create the path to the directory because
+ # if you use a relative path without any .. sequences then 7za.exe uses the
+ # entire relative path as part of the file paths in the archive. If you have
+ # a .. sequence or an absolute path then only the last directory is stored as
+ # part of the file paths in the archive, which is what we want.
cmd = [lzma_exec,
'a',
'-t7z',
archive_file,
- os.path.join(staging_dir, CHROME_DIR),
+ os.path.abspath(os.path.join(staging_dir, CHROME_DIR)),
'-mx0',]
# There doesnt seem to be any way in 7za.exe to override existing file so
# we always delete before creating a new one.
@@ -602,7 +607,7 @@ def DoComponentBuildTasks(staging_dir, build_dir, target_arch, current_version):
def main(options):
- """Main method that reads input file, creates archive file and write
+ """Main method that reads input file, creates archive file and writes
resource input file.
"""
current_version = BuildVersion(options.build_dir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698