summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2017-08-24 18:03:34 -0500
committerYifan Hong2017-08-25 19:53:17 -0500
commit27b59fce39d5cdb1aa35955e52b0ca5d386983f2 (patch)
treeb1a6e4907badedb53253e70662c663af37a01759
parent4c9c32b767461adb3b779563c0d165757ea022dd (diff)
downloadplatform-system-libvintf-27b59fce39d5cdb1aa35955e52b0ca5d386983f2.tar.gz
platform-system-libvintf-27b59fce39d5cdb1aa35955e52b0ca5d386983f2.tar.xz
platform-system-libvintf-27b59fce39d5cdb1aa35955e52b0ca5d386983f2.zip
assemble_vintf: remove hardcoded <kernel> version
... from fwk comp mat. Per b/38324908, these entries are hard-coded to compatibility_matrix.xml; they should be injected from the build system. Test: m system_compatibility_matrix.xml -j Bug: 64124223 Change-Id: Ia82b38c0e0109a2840ec45588bf805b786412c89
-rw-r--r--assemble_vintf.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/assemble_vintf.cpp b/assemble_vintf.cpp
index febb2d9..60cea7d 100644
--- a/assemble_vintf.cpp
+++ b/assemble_vintf.cpp
@@ -155,23 +155,23 @@ public:
155 } 155 }
156 156
157 bool assembleFrameworkCompatibilityMatrixKernels(CompatibilityMatrix* matrix) { 157 bool assembleFrameworkCompatibilityMatrixKernels(CompatibilityMatrix* matrix) {
158 if (!matrix->framework.mKernels.empty()) {
159 // Remove hard-coded <kernel version="x.y.z" /> in legacy files.
160 std::cerr << "WARNING: framework compatibility matrix has hard-coded kernel"
161 << " requirements for version";
162 for (const auto& kernel : matrix->framework.mKernels) {
163 std::cerr << " " << kernel.minLts();
164 }
165 std::cerr << ". Hard-coded requirements are removed." << std::endl;
166 matrix->framework.mKernels.clear();
167 }
158 for (const auto& pair : mKernels) { 168 for (const auto& pair : mKernels) {
159 std::vector<KernelConfig> configs; 169 std::vector<KernelConfig> configs;
160 if (!parseFilesForKernelConfigs(pair.second, &configs)) { 170 if (!parseFilesForKernelConfigs(pair.second, &configs)) {
161 return false; 171 return false;
162 } 172 }
163 bool added = false; 173 matrix->framework.mKernels.push_back(
164 for (auto& e : matrix->framework.mKernels) { 174 MatrixKernel{KernelVersion{pair.first}, std::move(configs)});
165 if (e.minLts() == pair.first) {
166 e.mConfigs.insert(e.mConfigs.end(), configs.begin(), configs.end());
167 added = true;
168 break;
169 }
170 }
171 if (!added) {
172 matrix->framework.mKernels.push_back(
173 MatrixKernel{KernelVersion{pair.first}, std::move(configs)});
174 }
175 } 175 }
176 return true; 176 return true;
177 } 177 }