Bug 15534 - The PACKAGE_EXCLUDE is not working
Summary: The PACKAGE_EXCLUDE is not working
Status: RESOLVED INVALID
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.1
Assignee: Jose Quaresma
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-06-28 16:38 UTC by Jose Quaresma
Modified: 2024-07-04 17:04 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Quaresma 2024-06-28 16:38:25 UTC
for example: if we set python3 as exclude package and install python3-dbus it goes well and no errors was raised.

echo 'PACKAGE_EXCLUDE = "python3"' >> conf/local.conf

bitbake python3-dbus -c do_rootfs



According to the documentation [1]

If you choose to not install a package using this variable and some other package is dependent on it (i.e. listed in a recipe’s RDEPENDS variable), the OpenEmbedded build system generates a fatal installation error. Because the build system halts the process with a fatal error, you can use the variable with an iterative development process to remove specific components from a system.

[1] https://docs.yoctoproject.org/ref-manual/variables.html?highlight=package_exclude#term-PACKAGE_EXCLUDE
Comment 1 Jose Quaresma 2024-07-02 16:27:36 UTC
The steps to reproduce the issue in the reporting message is not correct and it should be:

cat<< 'EOF' >>conf/local.conf
CORE_IMAGE_EXTRA_INSTALL += "python3-dbus"
PACKAGE_EXCLUDE = "python3"
EOF

bitbake core-image-minimal -c do_rootfs
Comment 2 Randy MacLeod 2024-07-04 14:36:56 UTC
Jose, can you try:

cat<< 'EOF' >>conf/local.conf
CORE_IMAGE_EXTRA_INSTALL += "python3-dbus"
PACKAGE_EXCLUDE = "python3-core"
EOF

and report if that fails or not?
Comment 3 Jose Quaresma 2024-07-04 17:04:52 UTC
Everything is fine with the suggested configuration.

cat<< 'EOF' >>conf/local.conf
CORE_IMAGE_EXTRA_INSTALL += "python3-dbus"
PACKAGE_EXCLUDE = "python3-core"
EOF

Sorry for the noise. I should have tested with more and different approaches.