platform_build_soong/third_party/zip/Android.bp
Dan Willemsen a1354b325d Fix Zip64 behavior in zip2zip
This was blindly copying the zip64 extra fields from the central
directory of the original zip file to the new one. The zip64 extra
fields depend on the contents of the header it's attached toa, and in
this case we were copying the zip64 file header offset from the central
directory entry into the destination local file header, which makes no
sense, especially since the offset changed in the new file.

So strip all zip64 extra entries, and we'll create them as necessary
when writing ou the new file.

Bug: 34704111
Test: zip2zip on the original target-files -> img that was broken
Test: m -j blueprint_tools (new android_test.go)
Change-Id: Ie3c0540b13d3afcf42f3d47fff319065952b126f
2017-02-17 13:21:03 -08:00

32 lines
967 B
Text

// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
bootstrap_go_package {
name: "android-archive-zip",
pkgPath: "android/soong/third_party/zip",
srcs: [
"reader.go",
"register.go",
"struct.go",
"writer.go",
"android.go",
],
testSrcs: [
"android_test.go",
"reader_test.go",
"writer_test.go",
"zip_test.go",
],
}