Bug 15534

Summary: The PACKAGE_EXCLUDE is not working
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jose Quaresma <quaresma.jose>
Component: oe-core otherAssignee: Jose Quaresma <quaresma.jose>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod
Version: unspecified   
Target Milestone: 5.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

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.