Bug 12160 - Exclude packages from recipes
Summary: Exclude packages from recipes
Status: RESOLVED WONTFIX
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-10-03 08:45 UTC by Ola Nilsson
Modified: 2019-11-21 19:39 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ola Nilsson 2017-10-03 08:45:14 UTC
It would be useful to have a way to exclude packages from a recipe, like LICENSE_EXCLUSION except configurable per recipe based on DISTRO_FEATURES and similar.

Even better would be if the RDEPENDS of excluded packages could be dropped to avoid unnecessary building of unused packages. 

Excluding packages like this would prevent them from being installed by mistake while still not seeing files as unpackaged.
Comment 1 Paul Eggleton 2017-10-05 03:16:55 UTC
The issue with this is you'd have to be completely bypassing any dependencies, which would potentially lead to issues at runtime. With that caveat though it would be fairly easy to implement.
Comment 2 Ola Nilsson 2017-10-05 10:06:39 UTC
Which dependencies are you talking about?

Runtime dependencies from other packages to the excluded packages should fail at filesystem generation, unless we can make it fail even sooner by not RPROVIDING them.

Runtime dependencies from the excluded package to any other package should be handled.

I guess buildtime dependencies could be an issue if populate_sysroot includes files for features that are later not packaged.
Comment 3 Paul Eggleton 2017-11-29 22:18:43 UTC
The thing is we have no visibility into how files within a package should be properly "disabled" - that's under the control of the build scripts for each individual recipe. Without that control I'm not sure that this feature is going to be particularly useful - users will see a package they want to exclude, attempt to exclude it and then they'll either see a failure at build time (if we're enforcing dependencies) or possibly a more subtle failure at runtime (if we don't). For case #1 at the image level at least we actually already have PACKAGE_EXCLUDE.

However I may be missing something about how you see this being implemented - let me know if that is the case.
Comment 4 Richard Purdie 2019-11-21 19:39:56 UTC
Due to the way FILES works, excluding specific packages from recipes would be extremely error prone as the files it normally picked up would then be available to other packages and their content would change. I see no workable way to make this work and remain tested so closing this as something we don't plan to do.