HalManifests can be merged.
assemble_vintf and VintfObject can now merge manifests
correctly (previously, only <hal>'s are merged).
Test: libvintf_test
Test: vintf_object_test
Fixes: 78943004
Change-Id: I5e2987e9c97e0b60e976fe4e0bb8833edf043a53
diff --git a/AssembleVintf.cpp b/AssembleVintf.cpp
index bcefc73..e0a22d1 100644
--- a/AssembleVintf.cpp
+++ b/AssembleVintf.cpp
@@ -358,26 +358,8 @@
}
}
- // TODO(b/78943004): add everything
- if (!halManifest->addAllHals(&manifestToAdd, &error)) {
- std::cerr << "File \"" << path << "\" cannot be added: conflict on HAL \"" << error
- << "\" with an existing HAL. See <hal> with the same name "
- << "in previously parsed files or previously declared in this file."
- << std::endl;
- return false;
- }
-
- // Check that manifestToAdd is empty.
- if (!manifestToAdd.empty()) {
- std::cerr
- << "File \"" << path << "\" contains extraneous entries and attributes. "
- << "This is currently unsupported (b/78943004); it can only contain "
- << "<hal>s and attribute \"type\" and \"version\". Only the first input "
- << "file to assemble_vintf can contain other things. "
- << "Remaining entries and attributes are:" << std::endl
- << gHalManifestConverter(
- manifestToAdd,
- SerializeFlags::EVERYTHING.disableMetaVersion().disableSchemaType());
+ if (!halManifest->addAll(&manifestToAdd, &error)) {
+ std::cerr << "File \"" << path << "\" cannot be added: " << error << std::endl;
return false;
}
}