Make binaries executable
Split InstallFileName into InstallExecutable that does chmod +x after copying the file. Also remove InstallFile and rename InstallFileName to InstallFile. Test: m -j checkbuild Change-Id: Id41ad4eafe521f6cd5d8cc250b7747ecb3da8dfc
This commit is contained in:
@@ -83,8 +83,8 @@ type ModuleContext interface {
|
||||
ExpandSourcesSubDir(srcFiles, excludes []string, subDir string) Paths
|
||||
Glob(globPattern string, excludes []string) Paths
|
||||
|
||||
InstallFile(installPath OutputPath, srcPath Path, deps ...Path) OutputPath
|
||||
InstallFileName(installPath OutputPath, name string, srcPath Path, deps ...Path) OutputPath
|
||||
InstallExecutable(installPath OutputPath, name string, srcPath Path, deps ...Path) OutputPath
|
||||
InstallFile(installPath OutputPath, name string, srcPath Path, deps ...Path) OutputPath
|
||||
InstallSymlink(installPath OutputPath, name string, srcPath OutputPath) OutputPath
|
||||
CheckbuildFile(srcPath Path)
|
||||
|
||||
@@ -717,8 +717,18 @@ func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallFileName(installPath OutputPath, name string, srcPath Path,
|
||||
func (a *androidModuleContext) InstallFile(installPath OutputPath, name string, srcPath Path,
|
||||
deps ...Path) OutputPath {
|
||||
return a.installFile(installPath, name, srcPath, Cp, deps)
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallExecutable(installPath OutputPath, name string, srcPath Path,
|
||||
deps ...Path) OutputPath {
|
||||
return a.installFile(installPath, name, srcPath, CpExecutable, deps)
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) installFile(installPath OutputPath, name string, srcPath Path,
|
||||
rule blueprint.Rule, deps []Path) OutputPath {
|
||||
|
||||
fullInstallPath := installPath.Join(a, name)
|
||||
a.module.base().hooks.runInstallHooks(a, fullInstallPath, false)
|
||||
@@ -738,7 +748,7 @@ func (a *androidModuleContext) InstallFileName(installPath OutputPath, name stri
|
||||
}
|
||||
|
||||
a.ModuleBuild(pctx, ModuleBuildParams{
|
||||
Rule: Cp,
|
||||
Rule: rule,
|
||||
Description: "install " + fullInstallPath.Base(),
|
||||
Output: fullInstallPath,
|
||||
Input: srcPath,
|
||||
@@ -753,10 +763,6 @@ func (a *androidModuleContext) InstallFileName(installPath OutputPath, name stri
|
||||
return fullInstallPath
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallFile(installPath OutputPath, srcPath Path, deps ...Path) OutputPath {
|
||||
return a.InstallFileName(installPath, filepath.Base(srcPath.String()), srcPath, deps...)
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name string, srcPath OutputPath) OutputPath {
|
||||
fullInstallPath := installPath.Join(a, name)
|
||||
a.module.base().hooks.runInstallHooks(a, fullInstallPath, true)
|
||||
|
Reference in New Issue
Block a user