summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/insane.bbclass28
1 files changed, 17 insertions, 11 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index d33918c7ce..11532ecd08 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -968,17 +968,6 @@ def package_qa_check_host_user(path, name, d, elf, messages):
968 return False 968 return False
969 return True 969 return True
970 970
971QARECIPETEST[src-uri-bad] = "package_qa_check_src_uri"
972def package_qa_check_src_uri(pn, d, messages):
973 import re
974
975 if "${PN}" in d.getVar("SRC_URI", False):
976 oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
977
978 for url in d.getVar("SRC_URI").split():
979 if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url):
980 oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d)
981
982QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check" 971QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check"
983def package_qa_check_unhandled_features_check(pn, d, messages): 972def package_qa_check_unhandled_features_check(pn, d, messages):
984 if not bb.data.inherits_class('features_check', d): 973 if not bb.data.inherits_class('features_check', d):
@@ -1285,11 +1274,28 @@ Rerun configure task after fixing this."""
1285 oe.qa.exit_if_errors(d) 1274 oe.qa.exit_if_errors(d)
1286} 1275}
1287 1276
1277def unpack_check_src_uri(pn, d):
1278 import re
1279
1280 skip = (d.getVar('INSANE_SKIP') or "").split()
1281 if 'src-uri-bad' in skip:
1282 bb.note("Recipe %s skipping qa checking: src-uri-bad" % d.getVar('PN'))
1283 return
1284
1285 if "${PN}" in d.getVar("SRC_URI", False):
1286 oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
1287
1288 for url in d.getVar("SRC_URI").split():
1289 if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url):
1290 oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d)
1291
1288python do_qa_unpack() { 1292python do_qa_unpack() {
1289 src_uri = d.getVar('SRC_URI') 1293 src_uri = d.getVar('SRC_URI')
1290 s_dir = d.getVar('S') 1294 s_dir = d.getVar('S')
1291 if src_uri and not os.path.exists(s_dir): 1295 if src_uri and not os.path.exists(s_dir):
1292 bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN'), d.getVar('S', False), s_dir)) 1296 bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN'), d.getVar('S', False), s_dir))
1297
1298 unpack_check_src_uri(d.getVar('PN'), d)
1293} 1299}
1294 1300
1295# The Staging Func, to check all staging 1301# The Staging Func, to check all staging