summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2025-04-17 01:05:11 -0700
committerKhem Raj <raj.khem@gmail.com>2025-04-19 14:36:04 -0700
commitb1281d5bc8fff3f890d9923468a056affd993b73 (patch)
treeaed1c88f7581488ca964b01f9d9b0f66a6c02624
parent095d61d2e259c483c048b6d4d73a85f56dc7a9e3 (diff)
downloadmeta-openembedded-b1281d5bc8fff3f890d9923468a056affd993b73.tar.gz
check-version-mismatch.bbclass: avoid meaningless checking
If users set CHECK_VERSION_PN for a recipe and its value is a single '%', then it matches anything. So there's no point doing any further check. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/classes/check-version-mismatch.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-oe/classes/check-version-mismatch.bbclass b/meta-oe/classes/check-version-mismatch.bbclass
index 7198895fed..a10b67c40a 100644
--- a/meta-oe/classes/check-version-mismatch.bbclass
+++ b/meta-oe/classes/check-version-mismatch.bbclass
@@ -207,6 +207,14 @@ python do_package_check_version_mismatch() {
207 os.makedirs(debug_directory, exist_ok=True) 207 os.makedirs(debug_directory, exist_ok=True)
208 data_lines.append("pv: %s\n" % pv) 208 data_lines.append("pv: %s\n" % pv)
209 209
210 # handle a special case: a pure % means matching all, no point in further checking
211 if pv == "%":
212 if enable_debug:
213 data_lines.append("FINAL RESULT: MATCH (%s matches all, skipped)\n\n" % pv)
214 with open(debug_data_file, "w") as f:
215 f.writelines(data_lines)
216 return
217
210 got_quick_match_result = False 218 got_quick_match_result = False
211 # handle python3-xxx recipes quickly 219 # handle python3-xxx recipes quickly
212 __regex_python_module_version__ = re.compile(r"(?:^|.*:)Version: (?P<version>.*)$") 220 __regex_python_module_version__ = re.compile(r"(?:^|.*:)Version: (?P<version>.*)$")