* [PATCH 1/2] insane: Add missing INSANE_SKIP mechanism for native-last QA check
@ 2021-01-27 21:33 Tomasz Dziendzielski
2021-01-27 21:33 ` [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk Tomasz Dziendzielski
0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-27 21:33 UTC (permalink / raw)
To: openembedded-core; +Cc: Tomasz Dziendzielski
See [YOCTO #5729] for details.
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
---
meta/classes/insane.bbclass | 43 +++++++++++++++++++------------------
1 file 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 () {
for i in issues:
package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE"), i), d)
- for native_class in ['native', 'nativesdk']:
- if bb.data.inherits_class(native_class, d):
-
- inherited_classes = d.getVar('__inherit_cache', False) or []
- needle = os.path.join('classes', native_class)
-
- bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split()
- # BBCLASSEXTEND items are always added in the end
- skip_classes = bbclassextend
- if bb.data.inherits_class('native', d) or 'native' in bbclassextend:
- # native also inherits nopackages and relocatable bbclasses
- skip_classes.extend(['nopackages', 'relocatable'])
-
- for class_item in reversed(inherited_classes):
- if needle not in class_item:
- for extend_item in skip_classes:
- if os.path.join('classes', '%s.bbclass' % extend_item) in class_item:
+ if 'native-last' not in (d.getVar('INSANE_SKIP') or "").split():
+ for native_class in ['native', 'nativesdk']:
+ if bb.data.inherits_class(native_class, d):
+
+ inherited_classes = d.getVar('__inherit_cache', False) or []
+ needle = os.path.join('classes', native_class)
+
+ bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split()
+ # BBCLASSEXTEND items are always added in the end
+ skip_classes = bbclassextend
+ if bb.data.inherits_class('native', d) or 'native' in bbclassextend:
+ # native also inherits nopackages and relocatable bbclasses
+ skip_classes.extend(['nopackages', 'relocatable'])
+
+ for class_item in reversed(inherited_classes):
+ if needle not in class_item:
+ for extend_item in skip_classes:
+ if os.path.join('classes', '%s.bbclass' % extend_item) in class_item:
+ break
+ else:
+ pn = d.getVar('PN')
+ package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d)
break
else:
- pn = d.getVar('PN')
- package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d)
break
- else:
- break
qa_sane = d.getVar("QA_SANE")
if not qa_sane:
--
2.30.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk
2021-01-27 21:33 [PATCH 1/2] insane: Add missing INSANE_SKIP mechanism for native-last QA check Tomasz Dziendzielski
@ 2021-01-27 21:33 ` Tomasz Dziendzielski
2021-01-28 20:27 ` [OE-core] " Otavio Salvador
0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-27 21:33 UTC (permalink / raw)
To: openembedded-core; +Cc: Tomasz Dziendzielski
See [YOCTO #5729] for details.
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
---
meta/classes/insane.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index e371c1c71f..53230fc667 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1381,6 +1381,7 @@ python () {
# native also inherits nopackages and relocatable bbclasses
skip_classes.extend(['nopackages', 'relocatable'])
+ broken_order = []
for class_item in reversed(inherited_classes):
if needle not in class_item:
for extend_item in skip_classes:
@@ -1388,10 +1389,13 @@ python () {
break
else:
pn = d.getVar('PN')
- package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d)
- break
+ broken_order.append(os.path.basename(class_item))
else:
break
+ if broken_order:
+ package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. "
+ "Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d)
+
qa_sane = d.getVar("QA_SANE")
if not qa_sane:
--
2.30.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk
2021-01-27 21:33 ` [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk Tomasz Dziendzielski
@ 2021-01-28 20:27 ` Otavio Salvador
2021-01-28 23:16 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2021-01-28 20:27 UTC (permalink / raw)
To: Tomasz Dziendzielski; +Cc: Patches and discussions about the oe-core layer
Em qua., 27 de jan. de 2021 às 18:30, Tomasz Dziendzielski
<tomasz.dziendzielski@gmail.com> escreveu:
>
> See [YOCTO #5729] for details.
>
> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
I'd prefer a little of context on the commit log.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk
2021-01-28 20:27 ` [OE-core] " Otavio Salvador
@ 2021-01-28 23:16 ` Richard Purdie
2021-01-28 23:46 ` Tomasz Dziendzielski
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2021-01-28 23:16 UTC (permalink / raw)
To: Otavio Salvador, Tomasz Dziendzielski
Cc: Patches and discussions about the oe-core layer
On Thu, 2021-01-28 at 17:27 -0300, Otavio Salvador wrote:
> Em qua., 27 de jan. de 2021 às 18:30, Tomasz Dziendzielski
> <tomasz.dziendzielski@gmail.com> escreveu:
> >
> > See [YOCTO #5729] for details.
> >
> > Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
>
> I'd prefer a little of context on the commit log.
Agreed, I've improved the log of the patch I've merged. Linking to a
bugzilla entry isn't really enough information. I appreciate the
patches though, there have been some good ones!
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk
2021-01-28 23:16 ` Richard Purdie
@ 2021-01-28 23:46 ` Tomasz Dziendzielski
0 siblings, 0 replies; 5+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-28 23:46 UTC (permalink / raw)
To: Richard Purdie
Cc: Otavio Salvador, Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
>> I'd prefer a little of context on the commit log.
>
>Agreed, I've improved the log of the patch I've merged. Linking to a
>bugzilla entry isn't really enough information. I appreciate the
>patches though, there have been some good ones!
Thank you both for your feedback and for improving the commit log. I will
add more descriptive messages even for small changes next time.
Best regards,
Tomasz Dziendzielski
[-- Attachment #2: Type: text/html, Size: 624 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-28 23:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 21:33 [PATCH 1/2] insane: Add missing INSANE_SKIP mechanism for native-last QA check Tomasz Dziendzielski
2021-01-27 21:33 ` [PATCH 2/2] insane: native-last: Print classes inherited after native/nativesdk Tomasz Dziendzielski
2021-01-28 20:27 ` [OE-core] " Otavio Salvador
2021-01-28 23:16 ` Richard Purdie
2021-01-28 23:46 ` Tomasz Dziendzielski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.