diff options
author | 2025-02-27 14:30:01 +0900 | |
---|---|---|
committer | 2025-02-27 14:34:43 +0900 | |
commit | 13e919154dcb65a4cb06b6bf434744d08e7fdd28 (patch) | |
tree | eb72982e3f548dd8e7a554e00c9842d08ef677fd /apex/apex.go | |
parent | 5499b7a8b8f87faeb7b968d98d5330cdb7bce4dd (diff) |
apex: disallow VINTF fragments in updatable APEX
Since libvintf doesn't support forward compatibility, updatable APEXes
shouldn't have VINTF fragments.
Bug: 399527905
Test: m nothing --no-skip-soong-tests
Change-Id: Ie0f1b4599f27d9aa478aac689dd167e77b3733b8
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apex/apex.go b/apex/apex.go index 4dd3d4cc0..38381aeed 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -18,6 +18,7 @@ package apex import ( "fmt" + "path" "path/filepath" "regexp" "slices" @@ -2258,6 +2259,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { a.enforcePartitionTagOnApexSystemServerJar(ctx) a.verifyNativeImplementationLibs(ctx) + a.enforceNoVintfInUpdatable(ctx) android.SetProvider(ctx, android.ApexBundleDepsDataProvider, android.ApexBundleDepsData{ FlatListPath: a.FlatListPath(), @@ -2916,3 +2918,16 @@ func (a *apexBundle) verifyNativeImplementationLibs(ctx android.ModuleContext) { } } } + +// TODO(b/399527905) libvintf is not forward compatible. +func (a *apexBundle) enforceNoVintfInUpdatable(ctx android.ModuleContext) { + if !a.Updatable() { + return + } + for _, fi := range a.filesInfo { + if match, _ := path.Match("etc/vintf/*", fi.path()); match { + ctx.ModuleErrorf("VINTF fragment (%s) is not supported in updatable APEX.", fi.path()) + break + } + } +} |