Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c41b8a7 authored by Cole Faust's avatar Cole Faust
Browse files

Add handle to enforce_product_packages_exist

Bug: 229132189
Test: go test
Change-Id: I76804354051f0866c8cad48c1189b36de4f73e23
parent 5e745599
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ var knownFunctions = map[string]interface {
	"copy-files":                           &simpleCallParser{name: baseName + ".copy_files", returnType: starlarkTypeList},
	"dir":                                  &simpleCallParser{name: baseName + ".dir", returnType: starlarkTypeString},
	"dist-for-goals":                       &simpleCallParser{name: baseName + ".mkdist_for_goals", returnType: starlarkTypeVoid, addGlobals: true},
	"enforce-product-packages-exist":       &simpleCallParser{name: baseName + ".enforce_product_packages_exist", returnType: starlarkTypeVoid},
	"enforce-product-packages-exist":       &simpleCallParser{name: baseName + ".enforce_product_packages_exist", returnType: starlarkTypeVoid, addHandle: true},
	"error":                                &makeControlFuncParser{name: baseName + ".mkerror"},
	"findstring":                           &simpleCallParser{name: baseName + ".findstring", returnType: starlarkTypeInt},
	"find-copy-subdir-files":               &simpleCallParser{name: baseName + ".find_and_copy", returnType: starlarkTypeList},
@@ -1241,7 +1241,7 @@ func (ctx *parseContext) maybeParseFunctionCall(node mkparser.Node, ref *mkparse
		}
		name = words[0].Dump()
		if len(words) < 2 {
			args = &mkparser.MakeString{}
			args = mkparser.SimpleMakeString("", words[0].Pos())
		} else {
			args = words[1]
		}
+2 −2
Original line number Diff line number Diff line
@@ -773,8 +773,8 @@ $(call add-product-dex-preopt-module-config,MyModule,disable)

def init(g, handle):
  cfg = rblf.cfg(handle)
  rblf.enforce_product_packages_exist("")
  rblf.enforce_product_packages_exist("foo")
  rblf.enforce_product_packages_exist(handle, "")
  rblf.enforce_product_packages_exist(handle, "foo")
  rblf.require_artifacts_in_path(handle, "foo", "bar")
  rblf.require_artifacts_in_path_relaxed(handle, "foo", "bar")
  rblf.mkdist_for_goals(g, "goal", "from:to")