diff options
author | Jiyong Park <jiyong@google.com> | 2019-04-01 15:30:42 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-04-01 19:25:08 +0900 |
commit | c320e8262a2881e5ccf919738fb113ddb09eadf3 (patch) | |
tree | 6042144a02103d5ed8cd70553ff681532bca7a11 /apex | |
parent | 42cca6c95175d43ea85088181f22f9d2b3d3b583 (diff) | |
download | build_soong-c320e8262a2881e5ccf919738fb113ddb09eadf3.tar.gz build_soong-c320e8262a2881e5ccf919738fb113ddb09eadf3.tar.bz2 build_soong-c320e8262a2881e5ccf919738fb113ddb09eadf3.zip |
Key property is removed from prebuilt_apex
The property is not needed as key is embedded in the apex.
Bug: 128344735
Test: m
Change-Id: Iae671994fc271593dd9319f6262279736ea34ad1
Diffstat (limited to 'apex')
-rw-r--r-- | apex/apex.go | 10 | ||||
-rw-r--r-- | apex/apex_test.go | 30 |
2 files changed, 0 insertions, 40 deletions
diff --git a/apex/apex.go b/apex/apex.go index 949457ab..ce1ed46b 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1317,18 +1317,9 @@ type PrebuiltProperties struct { Src *string } } - - // the name of the apex_key module that contains the matching public key to be installed. - Key *string } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { - if String(p.properties.Key) == "" { - ctx.ModuleErrorf("key is missing") - return - } - ctx.AddDependency(ctx.Module(), keyTag, *p.properties.Key) - // This is called before prebuilt_select and prebuilt_postdeps mutators // The mutators requires that src to be set correctly for each arch so that // arch variants are disabled when src is not provided for the arch. @@ -1380,7 +1371,6 @@ func (p *Prebuilt) AndroidMk() android.AndroidMkData { func(w io.Writer, outputFile android.Path) { fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString())) fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", p.BaseModuleName()+imageApexSuffix) - fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", String(p.properties.Key)) }, }, } diff --git a/apex/apex_test.go b/apex/apex_test.go index 46eabe1d..6d101d8a 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -15,8 +15,6 @@ package apex import ( - "bufio" - "bytes" "io/ioutil" "os" "strings" @@ -1248,14 +1246,6 @@ func TestPrebuilt(t *testing.T) { src: "myapex-arm.apex", }, }, - key: "myapex.key" - } - - apex_key { - name: "myapex.key", - public_key: "testkey.avbpubkey", - private_key: "testkey.pem", - product_specific: true, } `) @@ -1265,24 +1255,4 @@ func TestPrebuilt(t *testing.T) { if prebuilt.inputApex.String() != expectedInput { t.Errorf("inputApex invalid. expected: %q, actual: %q", expectedInput, prebuilt.inputApex.String()) } - - // Check if the key module is added as a required module. - buf := &bytes.Buffer{} - prebuilt.AndroidMk().Extra[0](buf, nil) - found := false - scanner := bufio.NewScanner(bytes.NewReader(buf.Bytes())) - expected := "myapex.key" - for scanner.Scan() { - line := scanner.Text() - tok := strings.Split(line, " := ") - if tok[0] == "LOCAL_REQUIRED_MODULES" { - found = true - if tok[1] != "myapex.key" { - t.Errorf("Unexpected LOCAL_REQUIRED_MODULES '%s', expected '%s'", tok[1], expected) - } - } - } - if !found { - t.Errorf("Couldn't find a LOCAL_REQUIRED_MODULES entry") - } } |