Bug 14099 - PACKAGE_EXCLUDE not removing packages when PACKAGE_CLASSES = "package_deb"
Summary: PACKAGE_EXCLUDE not removing packages when PACKAGE_CLASSES = "package_deb"
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 3.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.1 M3
Assignee: Chee Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-10-19 10:52 UTC by Diego Sueiro
Modified: 2022-09-27 03:46 UTC (History)
6 users (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 Diego Sueiro 2020-10-19 10:52:50 UTC
I'm having problems with `IMAGE_FEATURES += "dev-pkgs"`,  `PACKAGE_EXCLUDE_append=" grub-dev"` and `PACKAGE_CLASSES = "package_deb"`,  where despite of the package has the "Pin-Priority: -1" in /apt/preferences, apt-get install still tries to install it.

This is the build failure output:

```
WARNING: core-image-minimal-1.0-r0 do_rootfs: Unable to install packages. Command '<snip>/build/tmp/work/n1sdp-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/apt-get  install --force-yes --allow-unauthenticated --no-remove apt-dev bc-dev binutils-dev bison-dev bridge-utils-dev busybox-dev bzip2-dev ca-certificates-dev cgroup-lite-dev containerd-opencontainers-dev docker-ce-dev dpkg-dev eudev-dev flex-dev gcc-dev grub-bootconf-dev grub-dev grub-efi-dev init-ifupdown-dev init-system-helpers-dev initscripts-dev iptables-dev kernel-dev kernel-devsrc-dev kmod-dev libcap-ng-dev libffi-dev libgnutls-dev libidn2-dev libjitterentropy-dev libnsl-dev libsqlite3-dev libtirpc-dev libunistring-dev linux-firmware-dev lz4-dev m4-dev modutils-initscripts-dev netbase-dev nettle-dev openssh-dev packagegroup-core-boot-dev packagegroup-core-ssh-openssh-dev packagegroup-docker-runtime-minimal-dev python3-dev rng-tools-dev run-postinsts-dev runc-docker-dev sysfsutils-dev sysvinit-dev sysvinit-inittab-dev tar-dev tini-dev update-rc.d-dev util-linux-dev xz-dev' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
Package grub-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Package 'grub-dev' has no installation candidate

WARNING: core-image-minimal-1.0-r0 do_rootfs: [log_check] core-image-minimal: found 1 warning message in the logfile:
[log_check] WARNING: Unable to install packages. Command '<snip>/build/tmp/work/n1sdp-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/apt-get  install --force-yes --allow-unauthenticated --no-remove apt-dev bc-dev binutils-dev bison-dev bridge-utils-dev busybox-dev bzip2-dev ca-certificates-dev cgroup-lite-dev containerd-opencontainers-dev docker-ce-dev dpkg-dev eudev-dev flex-dev gcc-dev grub-bootconf-dev grub-dev grub-efi-dev init-ifupdown-dev init-system-helpers-dev initscripts-dev iptables-dev kernel-dev kernel-devsrc-dev kmod-dev libcap-ng-dev libffi-dev libgnutls-dev libidn2-dev libjitterentropy-dev libnsl-dev libsqlite3-dev libtirpc-dev libunistring-dev linux-firmware-dev lz4-dev m4-dev modutils-initscripts-dev netbase-dev nettle-dev openssh-dev packagegroup-core-boot-dev packagegroup-core-ssh-openssh-dev packagegroup-docker-runtime-minimal-dev python3-dev rng-tools-dev run-postinsts-dev runc-docker-dev sysfsutils-dev sysvinit-dev sysvinit-inittab-dev tar-dev tini-dev update-rc.d-dev util-linux-dev xz-dev' returned 100:

ERROR: core-image-minimal-1.0-r0 do_rootfs: [log_check] core-image-minimal: found 1 error message in the logfile:
[log_check] E: Package 'grub-dev' has no installation candidate

```
Comment 1 Randy MacLeod 2021-03-22 21:33:27 UTC
Bumping to M4. 

Stacy,
   Please let me know if you want to keep this bug and plan to work on it over the coming weeks or 3.4 release cycle. 
Randy
Comment 2 Randy MacLeod 2021-06-24 19:24:42 UTC
Moved to unassigned since I don't use .deb packaging myself.
Comment 3 Chee Yang 2022-09-22 11:52:57 UTC
PACKAGE_EXCLUDE is for optional package, like for example to exclude "vim-help" or "vim-tutor" package when installing "vim" through IMAGE_INSTALL.

"-dev" package as complementary package should be exclude using PACKAGE_EXCLUDE_COMPLEMENTARY [1]. 

Hence i think this is not real issue.

[1] https://docs.yoctoproject.org/ref-manual/variables.html?highlight=package_exclude_complementary#term-PACKAGE_EXCLUDE_COMPLEMENTARYY
Comment 4 Chee Yang 2022-09-23 09:14:59 UTC
with master (99b35ab818538c83ca2df87f685b35b3619cc2ef), i can produce similar error with package_ipk and package_rpm too.

PACKAGE_EXCLUDE_COMPLEMENTARY works well with all 3 ipk, deb and rpm.
Comment 5 Chee Yang 2022-09-27 03:46:58 UTC
closing this as not a bug.