We have noticed, that with kernel version 6.1 the package dependency rewrite magic of the package_rpm.bbclass fails for the 'perf' recipe. What happens is, that the perf-dev package gets a faulty dependency on the perf package: > perf = 6.6.1.0-r9 As you will notice, there is one "6" too much. E.g. generating an SDK that includes perf (and thus actually installs perf-dev) will fail with a dependency error: > Error: > Problem: conflicting requests > - nothing provides perf = 6.6.1.0-r9 needed by perf-dev-6.1.0-r9.nxp_imx8mp_evk While it is quite clear why this happens, a proper fix for this is unclear to me since I do not have an overview of the history and corner cases that seemed to be covered by the rpm rename handling. But maybe someone has? :) A more detailed description of the error cause: Perf has PV set to "1.0" default and gets "PKGV" from the kernel sources (using KERNEL_VERSION of kernelsrc.bbclass) during 'do_package'. For the above-noted case, PKGV will be set to "6.1.0". Now, since rpm allows only a single '-' in the dependency version (as a separator between "Version" and "Release"), the translate_vers() method attempts to rewrite the package dependency string and replace '-' by '+'. This is however useless in case of perf since the only "-" contained is for the revision ("-r9") but the check is triggered anyway by: > if '-' in ver: with 'ver' being '6.1.0-r9' in this case. The lines > if 'PKGV' in subd: > pv = subd['PV'] > pkgv = subd['PKGV'] > reppv = pkgv.replace('-', '+') > ver = ver.replace(pv, reppv).replace(pkgv, reppv) then lead to a replacement of the substring "1.0" (pv) in "6.1.0-r9" (ver) with "6.1.0" (reppv). Which then produces the above-mentioned "6.6.1.0-r9" dependency version string. This replacement has always been attempted but never succeeded as long as the kernel PKGV did not contain "1.0". This however changes with "6.1.0" now (and should have happened with "5.1.0", too). Since 6.1 will be the next LTS kernel, people will likely run into this. Reported-by: Bastian-Krause <b.krause@pengutronix.de>
Strangely, I'm not seeing the same behaviour: root@qemux86-64-c9:~# rpm -qa |grep perf perf-dev-6.1.0-r9.qemux86_64 perf-6.1.0-r9.qemux86_64 root@qemux86-64-c9:~# uname -a Linux qemux86-64-c9 6.1.0-yocto-standard #1 SMP PREEMPT_DYNAMIC Wed Dec 14 21:14:11 UTC 2022 x86_64 GNU/Linux Can you elaborate on your setup ? distro ? host distro ?
(In reply to comment #1) > Strangely, I'm not seeing the same behaviour: > > root@qemux86-64-c9:~# rpm -qa |grep perf > perf-dev-6.1.0-r9.qemux86_64 > perf-6.1.0-r9.qemux86_64 Yes, the generated package versions aren't affected. But dependencies within the dev-package should be: rpm -qR tmp/deploy/rpm/qemux86_64/perf-dev-6.1.0-r9.qemux86_64.rpm perf = 6.6.1.0-r9 [...] Adding an "IMAGE_INSTALL:append = " perf-dev" should be sufficient to trigger the issue during do_rootfs. > root@qemux86-64-c9:~# uname -a > Linux qemux86-64-c9 6.1.0-yocto-standard #1 SMP PREEMPT_DYNAMIC Wed Dec 14 > 21:14:11 UTC 2022 x86_64 GNU/Linux > > Can you elaborate on your setup ? distro ? host distro ? Poky git with poky distro. Host distro is Debian 11. Detailed info: Build Configuration: BB_VERSION = "2.0.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "4.0.5" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta meta-poky meta-yocto-bsp = "HEAD:c8839099506ee9c694f5b9da3ef6cc7cf0b2c142" ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command '[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/yum.repos.d --installroot=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs --setopt=logdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp --repofrompath=oe-repo,[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo --nogpgcheck install dnf packagegroup-core-boot perf-dev rpm run-postinsts' returned 1: DNF version: 4.11.1 cachedir: [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/var/cache/dnf Added oe-repo repo from [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo User-Agent: falling back to 'libdnf': could not detect OS or basearch repo: using cache for: oe-repo oe-repo: using metadata from Fri 16 Dec 2022 02:56:56 PM UTC. Last metadata expiration check: 0:00:01 ago on Fri 16 Dec 2022 02:56:57 PM UTC. --> Starting dependency resolution --> Finished dependency resolution Error: Problem: conflicting requests - nothing provides perf = 6.6.1.0-r9 needed by perf-dev-6.1.0-r9.qemux86_64 (try to add '--skip-broken' to skip uninstallable packages)
(In reply to comment #2) > (In reply to comment #1) > > Strangely, I'm not seeing the same behaviour: > > > > root@qemux86-64-c9:~# rpm -qa |grep perf > > perf-dev-6.1.0-r9.qemux86_64 > > perf-6.1.0-r9.qemux86_64 > > Yes, the generated package versions aren't affected. > But dependencies within the dev-package should be: > > rpm -qR tmp/deploy/rpm/qemux86_64/perf-dev-6.1.0-r9.qemux86_64.rpm > perf = 6.6.1.0-r9 > [...] > > Adding an "IMAGE_INSTALL:append = " perf-dev" should be sufficient to > trigger the issue during do_rootfs. > Interesting. I'm of course using poky master as well, as I'm finalizing the new reference kernels, and I had worked through 6.1 before our fall release, as it was the development kernel. And for my perf-dev testing, I have it in my local.conf in a similar manner. grep perf-dev conf/local.conf #CORE_IMAGE_EXTRA_INSTALL += " perf perf-dev" IMAGE_INSTALL:append = " perf-dev" Either technique works, and I'm able to built, install and see it on the target. I'll continue to poke at this a bit more. > > root@qemux86-64-c9:~# uname -a > > Linux qemux86-64-c9 6.1.0-yocto-standard #1 SMP PREEMPT_DYNAMIC Wed Dec 14 > > 21:14:11 UTC 2022 x86_64 GNU/Linux > > > > Can you elaborate on your setup ? distro ? host distro ? > > Poky git with poky distro. Host distro is Debian 11. > > Detailed info: > > Build Configuration: > BB_VERSION = "2.0.0" > BUILD_SYS = "x86_64-linux" > NATIVELSBSTRING = "universal" > TARGET_SYS = "x86_64-poky-linux" > MACHINE = "qemux86-64" > DISTRO = "poky" > DISTRO_VERSION = "4.0.5" > TUNE_FEATURES = "m64 core2" > TARGET_FPU = "" > meta > meta-poky > meta-yocto-bsp = "HEAD:c8839099506ee9c694f5b9da3ef6cc7cf0b2c142" > > > ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command > '[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe- > sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/dnf/ > dnf.conf > --setopt=reposdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0- > r0/rootfs/etc/yum.repos.d > --installroot=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/ > rootfs > --setopt=logdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0- > r0/temp > --repofrompath=oe-repo,[..]/tmp/work/qemux86_64-poky-linux/core-image- > minimal/1.0-r0/oe-rootfs-repo --nogpgcheck install dnf > packagegroup-core-boot perf-dev rpm run-postinsts' returned 1: > DNF version: 4.11.1 > cachedir: > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/var/ > cache/dnf > Added oe-repo repo from > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo > User-Agent: falling back to 'libdnf': could not detect OS or basearch > repo: using cache for: oe-repo > oe-repo: using metadata from Fri 16 Dec 2022 02:56:56 PM UTC. > Last metadata expiration check: 0:00:01 ago on Fri 16 Dec 2022 02:56:57 PM > UTC. > --> Starting dependency resolution > --> Finished dependency resolution > Error: > Problem: conflicting requests > - nothing provides perf = 6.6.1.0-r9 needed by perf-dev-6.1.0-r9.qemux86_64 > (try to add '--skip-broken' to skip uninstallable packages)
(In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > Strangely, I'm not seeing the same behaviour: > > > > > > root@qemux86-64-c9:~# rpm -qa |grep perf > > > perf-dev-6.1.0-r9.qemux86_64 > > > perf-6.1.0-r9.qemux86_64 > > > > Yes, the generated package versions aren't affected. > > But dependencies within the dev-package should be: > > > > rpm -qR tmp/deploy/rpm/qemux86_64/perf-dev-6.1.0-r9.qemux86_64.rpm > > perf = 6.6.1.0-r9 > > [...] > > > > Adding an "IMAGE_INSTALL:append = " perf-dev" should be sufficient to > > trigger the issue during do_rootfs. > > > > Interesting. I'm of course using poky master as well, as I'm finalizing the > new reference kernels, and I had worked through 6.1 before our fall release, > as it was the development kernel. > > And for my perf-dev testing, I have it in my local.conf in a similar manner. Ok, I was still using kirkstone for testing but assumed master should behave the same since the code I assumed to be responsible did not change there. Interestingly, since I have now tested against master, the issue is actually gone. But as far as I can tell this is only because suddenly the "perf-dev" package does not depend on the "perf" package at all. I have not yet further investigated if this is by design or by accident.
(In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > Strangely, I'm not seeing the same behaviour: > > > > > > root@qemux86-64-c9:~# rpm -qa |grep perf > > > perf-dev-6.1.0-r9.qemux86_64 > > > perf-6.1.0-r9.qemux86_64 > > > > Yes, the generated package versions aren't affected. > > But dependencies within the dev-package should be: > > > > rpm -qR tmp/deploy/rpm/qemux86_64/perf-dev-6.1.0-r9.qemux86_64.rpm > > perf = 6.6.1.0-r9 > > [...] > > > > Adding an "IMAGE_INSTALL:append = " perf-dev" should be sufficient to > > trigger the issue during do_rootfs. > > > > Interesting. I'm of course using poky master as well, as I'm finalizing the > new reference kernels, and I had worked through 6.1 before our fall release, > as it was the development kernel. > > And for my perf-dev testing, I have it in my local.conf in a similar manner. > > grep perf-dev conf/local.conf > #CORE_IMAGE_EXTRA_INSTALL += " perf perf-dev" > IMAGE_INSTALL:append = " perf-dev" > > Either technique works, and I'm able to built, install and see it on the > target. > > I'll continue to poke at this a bit more. > > > > root@qemux86-64-c9:~# uname -a > > > Linux qemux86-64-c9 6.1.0-yocto-standard #1 SMP PREEMPT_DYNAMIC Wed Dec 14 > > > 21:14:11 UTC 2022 x86_64 GNU/Linux > > > > > > Can you elaborate on your setup ? distro ? host distro ? > > > > Poky git with poky distro. Host distro is Debian 11. > > > > Detailed info: > > > > Build Configuration: > > BB_VERSION = "2.0.0" > > BUILD_SYS = "x86_64-linux" > > NATIVELSBSTRING = "universal" > > TARGET_SYS = "x86_64-poky-linux" > > MACHINE = "qemux86-64" > > DISTRO = "poky" > > DISTRO_VERSION = "4.0.5" > > TUNE_FEATURES = "m64 core2" > > TARGET_FPU = "" > > meta > > meta-poky > > meta-yocto-bsp = "HEAD:c8839099506ee9c694f5b9da3ef6cc7cf0b2c142" > > > > > > ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command > > '[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe- > > sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c > > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/dnf/ > > dnf.conf > > --setopt=reposdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0- > > r0/rootfs/etc/yum.repos.d > > --installroot=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/ > > rootfs > > --setopt=logdir=[..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0- > > r0/temp > > --repofrompath=oe-repo,[..]/tmp/work/qemux86_64-poky-linux/core-image- > > minimal/1.0-r0/oe-rootfs-repo --nogpgcheck install dnf > > packagegroup-core-boot perf-dev rpm run-postinsts' returned 1: > > DNF version: 4.11.1 > > cachedir: > > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/var/ > > cache/dnf > > Added oe-repo repo from > > [..]/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo > > User-Agent: falling back to 'libdnf': could not detect OS or basearch > > repo: using cache for: oe-repo > > oe-repo: using metadata from Fri 16 Dec 2022 02:56:56 PM UTC. > > Last metadata expiration check: 0:00:01 ago on Fri 16 Dec 2022 02:56:57 PM > > UTC. > > --> Starting dependency resolution > > --> Finished dependency resolution > > Error: > > Problem: conflicting requests > > - nothing provides perf = 6.6.1.0-r9 needed by perf-dev-6.1.0-r9.qemux86_64 > > (try to add '--skip-broken' to skip uninstallable packages) I guess it was fixed in https://git.openembedded.org/openembedded-core/commit/?id=bf2096a43d56c2d633a4b6e3db9e4390da4be6e2
Richard merged the fix, closing