Merge "Forbid updatable: true on vendor APEXes." am: 7260025670
am: c046926ac5
am: ab360daa03
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908986 Change-Id: Idd0c13bbed57b239a2941191e37a4c0c22c61d82
This commit is contained in:
@@ -2377,6 +2377,9 @@ func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) {
|
|||||||
if a.UsePlatformApis() {
|
if a.UsePlatformApis() {
|
||||||
ctx.PropertyErrorf("updatable", "updatable APEXes can't use platform APIs")
|
ctx.PropertyErrorf("updatable", "updatable APEXes can't use platform APIs")
|
||||||
}
|
}
|
||||||
|
if a.SocSpecific() || a.DeviceSpecific() {
|
||||||
|
ctx.PropertyErrorf("updatable", "vendor APEXes are not updatable")
|
||||||
|
}
|
||||||
a.checkJavaStableSdkVersion(ctx)
|
a.checkJavaStableSdkVersion(ctx)
|
||||||
a.checkClasspathFragments(ctx)
|
a.checkClasspathFragments(ctx)
|
||||||
}
|
}
|
||||||
|
@@ -7075,6 +7075,23 @@ func TestUpdatableDefault_should_set_min_sdk_version(t *testing.T) {
|
|||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestUpdatable_cannot_be_vendor_apex(t *testing.T) {
|
||||||
|
testApexError(t, `"myapex" .*: updatable: vendor APEXes are not updatable`, `
|
||||||
|
apex {
|
||||||
|
name: "myapex",
|
||||||
|
key: "myapex.key",
|
||||||
|
updatable: true,
|
||||||
|
soc_specific: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
apex_key {
|
||||||
|
name: "myapex.key",
|
||||||
|
public_key: "testkey.avbpubkey",
|
||||||
|
private_key: "testkey.pem",
|
||||||
|
}
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
func TestUpdatable_should_not_set_generate_classpaths_proto(t *testing.T) {
|
func TestUpdatable_should_not_set_generate_classpaths_proto(t *testing.T) {
|
||||||
testApexError(t, `"mysystemserverclasspathfragment" .* it must not set generate_classpaths_proto to false`, `
|
testApexError(t, `"mysystemserverclasspathfragment" .* it must not set generate_classpaths_proto to false`, `
|
||||||
apex {
|
apex {
|
||||||
|
Reference in New Issue
Block a user