Bug 13573 - Sanity check SDK_VENDOR
Summary: Sanity check SDK_VENDOR
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.1 M3
Assignee: Ankur Tyagi
QA Contact:
URL:
Whiteboard: NEWCOMER BACKPORT
Depends on:
Blocks:
 
Reported: 2019-10-04 15:50 UTC by Ross Burton
Modified: 2020-02-10 13:44 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2019-10-04 15:50:13 UTC
SDK_VENDOR shouldn't have any extra hyphens in because it is used to form a dash-separated triple and if there's more hyphens then things break.

For example with SDK_VENDOR="-myd-sdk":

Checking target system type... Invalid configuration `x86_64-myd-sdk-linux': machine `x86_64-myd-sdk' not recognized

Changing the SDK_VENDOR to "-myd_sdk" fixed the build.

We should check for this at SDK construction time, so that the user can't build a broken SDK.
Comment 1 Ankur Tyagi 2020-02-01 03:33:52 UTC
I thought of putting a check inside sdk_variables() inside populate_sdk_base class but it has limitations:
- works only for the first time but not for successive invoke
- only works for populate_sdk but misses meta-toolchain

Can I get some more insight/ideas on this? thanks
Comment 2 Ross Burton 2020-02-05 22:07:51 UTC
A better place to do that logic would be sanity.bbclass, this is where all of the pre-build sanity checks are implemented.
Comment 3 Ankur Tyagi 2020-02-09 04:16:42 UTC
Hi Ross,

This seems to be fixed now by your commit
https://github.com/openembedded/openembedded-core/commit/b0efd8d4d0dbc30e6505b42f5603f18fa764d732

This bug can be closed
Comment 4 Ross Burton 2020-02-10 13:44:45 UTC
Huh.  I had totally forgotten I wrote that.  Sorry for not closing this earlier.