Skip to contentSkip to conversation

sanity.bbclass: echo current SDK_VENDOR if it is invalid

PATCH In review Paul Gortmaker 2 participants 3 messages Apr 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sanity.bbclass: echo current SDK_VENDOR if it is invalid

It can be frustrating if this sanity check triggers, but you don't know why; you haven't explicitly set any SDK vars, or similar.

At least echo out the offending value, so the end user has a bit more information to go on.

Before:
SDK_VENDOR should be of the form '-foosdk' with a single dash
After:
SDK_VENDOR should be of the form '-foosdk' with a single dash; found '-overc-sdk'

meta/classes/sanity.bbclass +1 -1
index 88888e814a48..c823b49c03b0 100644
@@ -823,7 +823,7 @@ def check_sanity_everybuild(status, d):
     # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
     sdkvendor = d.getVar("SDK_VENDOR")
     if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
-        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n")
+        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash; found '%s'\n" % sdkvendor)
 
     check_supported_distro(d)
 
Signature · 1 line
2.17.1
#1 lore raw

Why Poky? Should this go to OE-Core?

Quoted 33 lines · Paul Gortmaker

It can be frustrating if this sanity check triggers, but you don't know why; you haven't explicitly set any SDK vars, or similar.

At least echo out the offending value, so the end user has a bit more information to go on.

Before:
SDK_VENDOR should be of the form '-foosdk' with a single dash
After:
SDK_VENDOR should be of the form '-foosdk' with a single dash; found '-overc-sdk'

meta/classes/sanity.bbclass +1 -1
index 88888e814a48..c823b49c03b0 100644
@@ -823,7 +823,7 @@ def check_sanity_everybuild(status, d):
     # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
     sdkvendor = d.getVar("SDK_VENDOR")
     if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
-        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n")
+        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash; found '%s'\n" % sdkvendor)
 
     check_supported_distro(d)
 
Signature · 1 line
2.17.1
#2 lore raw
Quoted 1 line · [Re: [poky] [PATCH] sanity.bbclass: echo current SDK_VENDOR if it is invalid]…

Why Poky? Should this go to OE-Core?

Probably. Maybe after another 10y with yocto/oe-core/poky I'll finally manage to get the right mailing lists for the right components...?

Anyway, thanks - resent to oe-core.

Paul.
--

Quoted 36 lines · Paul Gortmaker
Quoted 33 lines

It can be frustrating if this sanity check triggers, but you don't know why; you haven't explicitly set any SDK vars, or similar.

At least echo out the offending value, so the end user has a bit more information to go on.

Before:
SDK_VENDOR should be of the form '-foosdk' with a single dash
After:
SDK_VENDOR should be of the form '-foosdk' with a single dash; found '-overc-sdk'

meta/classes/sanity.bbclass +1 -1
index 88888e814a48..c823b49c03b0 100644
@@ -823,7 +823,7 @@ def check_sanity_everybuild(status, d):
     # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
     sdkvendor = d.getVar("SDK_VENDOR")
     if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
-        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n")
+        status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash; found '%s'\n" % sdkvendor)
 
     check_supported_distro(d)
 
Signature · 1 line
2.17.1