diff options
| author | Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> | 2021-01-27 22:33:10 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-28 23:12:05 +0000 |
| commit | eb604952d5a0e1a4554432efc364972f083cf69d (patch) | |
| tree | d01241016310ed04c69235435348663169d93c69 /meta/classes | |
| parent | 4e03f041396121f6143fd81bf5e429015146bfdc (diff) | |
| download | poky-eb604952d5a0e1a4554432efc364972f083cf69d.tar.gz | |
insane: Add missing INSANE_SKIP mechanism for native-last QA check
Ensure that the native-last QA check can be controlled by the INSANE_SKIP
variable (realted to [YOCTO #5729]).
(From OE-Core rev: 2d95aee64766341bf81f610386bac222e329f1bb)
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/insane.bbclass | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 3597943ddd..e371c1c71f 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
| @@ -1367,30 +1367,31 @@ python () { | |||
| 1367 | for i in issues: | 1367 | for i in issues: |
| 1368 | package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE"), i), d) | 1368 | package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE"), i), d) |
| 1369 | 1369 | ||
| 1370 | for native_class in ['native', 'nativesdk']: | 1370 | if 'native-last' not in (d.getVar('INSANE_SKIP') or "").split(): |
| 1371 | if bb.data.inherits_class(native_class, d): | 1371 | for native_class in ['native', 'nativesdk']: |
| 1372 | 1372 | if bb.data.inherits_class(native_class, d): | |
| 1373 | inherited_classes = d.getVar('__inherit_cache', False) or [] | 1373 | |
| 1374 | needle = os.path.join('classes', native_class) | 1374 | inherited_classes = d.getVar('__inherit_cache', False) or [] |
| 1375 | 1375 | needle = os.path.join('classes', native_class) | |
| 1376 | bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split() | 1376 | |
| 1377 | # BBCLASSEXTEND items are always added in the end | 1377 | bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split() |
| 1378 | skip_classes = bbclassextend | 1378 | # BBCLASSEXTEND items are always added in the end |
| 1379 | if bb.data.inherits_class('native', d) or 'native' in bbclassextend: | 1379 | skip_classes = bbclassextend |
| 1380 | # native also inherits nopackages and relocatable bbclasses | 1380 | if bb.data.inherits_class('native', d) or 'native' in bbclassextend: |
| 1381 | skip_classes.extend(['nopackages', 'relocatable']) | 1381 | # native also inherits nopackages and relocatable bbclasses |
| 1382 | 1382 | skip_classes.extend(['nopackages', 'relocatable']) | |
| 1383 | for class_item in reversed(inherited_classes): | 1383 | |
| 1384 | if needle not in class_item: | 1384 | for class_item in reversed(inherited_classes): |
| 1385 | for extend_item in skip_classes: | 1385 | if needle not in class_item: |
| 1386 | if os.path.join('classes', '%s.bbclass' % extend_item) in class_item: | 1386 | for extend_item in skip_classes: |
| 1387 | if os.path.join('classes', '%s.bbclass' % extend_item) in class_item: | ||
| 1388 | break | ||
| 1389 | else: | ||
| 1390 | pn = d.getVar('PN') | ||
| 1391 | package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d) | ||
| 1387 | break | 1392 | break |
| 1388 | else: | 1393 | else: |
| 1389 | pn = d.getVar('PN') | ||
| 1390 | package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d) | ||
| 1391 | break | 1394 | break |
| 1392 | else: | ||
| 1393 | break | ||
| 1394 | 1395 | ||
| 1395 | qa_sane = d.getVar("QA_SANE") | 1396 | qa_sane = d.getVar("QA_SANE") |
| 1396 | if not qa_sane: | 1397 | if not qa_sane: |
