Bug 15130 - bitbake should warn if a function is defined only for specific cases
Summary: bitbake should warn if a function is defined only for specific cases
Status: ACCEPTED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 6.1
Assignee: Trevor Gamblin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-06-01 14:58 UTC by Trevor Gamblin
Modified: 2026-02-26 16:19 UTC (History)
3 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 Trevor Gamblin 2023-06-01 14:58:32 UTC
Related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=15129, it is possible to define a function in class or recipe files with specific variants for target, native, etc. in such a way that a cryptic failure may be observed if there is no "default" version. For example, if:

foo_rm_bar:class-target () {
        ...
}

foo_rm_bar:class-native () {
        ...
}

then the following should also be present to handle other cases:

foo_rm_bar () {
        :
}

otherwise failures may occur that misleadingly suggest issues with the packages themselves. If functions are incompletely defined this way, bitbake should be able to warn the user.