blob: 8d0de9e8b11d317f318fe5e5ce671f8742face01 [file] [log] [blame]
Jiyong Park073ea552020-11-09 14:08:34 +09001// Copyright 2020 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License")
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package android
16
17// PackagingSpec abstracts a request to place a built artifact at a certain path in a package.
18// A package can be the traditional <partition>.img, but isn't limited to those. Other examples could
19// be a new filesystem image that is a subset of system.img (e.g. for an Android-like mini OS running
20// on a VM), or a zip archive for some of the host tools.
21type PackagingSpec struct {
22 // Path relative to the root of the package
23 relPathInPackage string
24
25 // The path to the built artifact
26 srcPath Path
27
28 // If this is not empty, then relPathInPackage should be a symlink to this target. (Then
29 // srcPath is of course ignored.)
30 symlinkTarget string
31
32 // Whether relPathInPackage should be marked as executable or not
33 executable bool
34}