[packages] Add fuchsia_packages directly to monolith.
Currently fuchsia_packages are added to monolith by way of the
preprocess_products.py script. This layer of indirection isn't necessary
and we may add them to monolith directly before processing.
Also, tidied contradictory documentation.
Change-Id: Idb48e60f3cc273aac2f04c2cf939318d5153ea8c
diff --git a/gn/packages.gni b/gn/packages.gni
index 437f042..9d116c2 100644
--- a/gn/packages.gni
+++ b/gn/packages.gni
@@ -28,8 +28,9 @@
board_packages = []
# List of packages (a GN list of strings).
- # This list of packages is added to the set of "available" packages, see
- # `products` for more information.
+ # This list of packages is currently added to the set of "monolith" packages,
+ # see `products` for more information; in the future, these packages will be
+ # added to the "preinstall".
# If unset, layer will be guessed using //.jiri_manifest and
# //{layer}/products/default.gni will be used.
fuchsia_packages = []
@@ -52,6 +53,7 @@
}
monolith += board_packages
+monolith += fuchsia_packages
# Print a warning message if the legacy fuchsia_products field is set.
# Only print in the default toolchain so the warning only shows up once.
@@ -87,7 +89,6 @@
"--monolith=$monolith",
"--preinstall=$preinstall",
"--available=$available",
- "--packages=$fuchsia_packages",
"--legacy-products=$fuchsia_products",
],
"json")
diff --git a/gn/preprocess_products.py b/gn/preprocess_products.py
index 24e5b66..57297fc 100755
--- a/gn/preprocess_products.py
+++ b/gn/preprocess_products.py
@@ -66,9 +66,6 @@
parser.add_argument("--available",
help="List of package definitions for available packages",
required=True)
- parser.add_argument("--packages",
- help="JSON list of additional packages",
- required=False)
parser.add_argument("--legacy-products",
help="List of legacy product definitions",
required=False)
@@ -91,10 +88,6 @@
[parse_product(product, build_packages) for product in
json.loads(args.legacy_products)]
- # Merge the extra packages into the monolith set (these will move to preinstall in the future):
- if args.packages:
- build_packages["monolith"].update(json.loads(args.packages))
-
try:
monolith_results = preprocess_packages(list(build_packages["monolith"]))
preinstall_results = preprocess_packages(list(build_packages["preinstall"]))