Removed 7zip from Windows distribution of the Dart SDK

Bug: https://github.com/dart-lang/pub/issues/2939
Change-Id: I30148017e33a4d7af99102bd98b99e70d5641478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199250
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Jonas Finnemann Jensen 2021-05-12 14:50:50 +00:00 committed by commit-bot@chromium.org
parent aa952090fe
commit 47f88b5ff3
5 changed files with 6 additions and 56 deletions

16
DEPS
View file

@ -710,20 +710,4 @@ hooks = [
'action': ['python3', 'sdk/build/vs_toolchain.py', 'update'],
'condition': 'checkout_win'
},
{
"name": "7zip",
"pattern": ".",
"action": [
"download_from_google_storage",
"--no_auth",
"--no_resume",
"--bucket",
"dart-dependencies",
"--platform=win32",
"--extract",
"-s",
Var('dart_root') + "/third_party/7zip.tar.gz.sha1",
],
'condition': 'checkout_win'
},
]

View file

@ -280,19 +280,6 @@ foreach(library, _full_sdk_libraries) {
]
}
if (is_win) {
copy_tree_specs += [
{
target = "copy_7zip"
visibility = [ ":create_common_sdk" ]
deps = [ ":copy_libraries" ]
source = "../third_party/7zip"
dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset/7zip"
ignore_patterns = ".svn"
},
]
}
# This generates targets for everything in copy_tree_specs. The targets have the
# same name as the "target" fields in the scopes of copy_tree_specs.
copy_trees("copy_trees") {
@ -836,10 +823,6 @@ group("create_common_sdk") {
if (dart_target_arch != "ia32") {
public_deps += [ ":copy_dart2native" ]
}
if (is_win) {
public_deps += [ ":copy_7zip" ]
}
}
# Parts specific to the platform SDK.

View file

@ -7,7 +7,6 @@
!pkg_tested
!/tcmalloc
!d8
!7zip.tar.gz.sha1
!firefox_jsshell
!clang.tar.gz.sha1
!unittest.tar.gz.sha1

View file

@ -1 +0,0 @@
22fe352b3c39c4281a599cf8576abef80ec44cc9

View file

@ -74,7 +74,6 @@ def CreateAndUploadSDKZip(arch, sdk_path):
DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip)
def DartArchiveUploadSDKs(system, arch, sdk_zip):
namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
git_number = utils.GetArchiveVersion()
@ -171,26 +170,12 @@ def GsutilExists(gsu_path):
def CreateZip(directory, target_file):
if 'win' in BUILD_OS:
CreateZipWindows(directory, target_file)
else:
CreateZipPosix(directory, target_file)
def CreateZipPosix(directory, target_file):
with utils.ChangedWorkingDirectory(os.path.dirname(directory)):
command = ['zip', '-yrq9', target_file, os.path.basename(directory)]
Run(command)
def CreateZipWindows(directory, target_file):
with utils.ChangedWorkingDirectory(os.path.dirname(directory)):
zip_win = os.path.join(bot_utils.DART_DIR, 'third_party', '7zip', '7za')
command = [
zip_win, 'a', '-tzip', target_file,
os.path.basename(directory)
]
Run(command)
root = os.path.dirname(directory)
base = os.path.basename(directory)
f = shutil.make_archive(target_file, 'zip', root, base)
# make_archive will appened '.zip' to the filename, so we have to rename
# to avoid having it being '.zip.zip'
shutil.move(f, target_file)
def FileDelete(f):