how to specify the package version via RDEPENDS in package group #bitbake
On 11/23/22 06:25, Martin wrote:
thanks for reply, i original method was specified the package version in local.conf by PREFEREED_VERSION.As far as I remember, RDEPENDS is handled by the package manager when installing the package. So I imagine this is a way to make sure that a filesystem is not built with two packages that are incompatible at runtime by failing when creating the filesystem. The choice of which version to build is a responsibility of Bitbake which happens way before RDEPENDS.
i wondering if configure package version in package group via RDEPENDS makes it possible? but it seems impossible.
what situations allow REDPENDS to specify a version? thanks.
Also, chant #1 of Yocto applies:
recipe data is local, config data is global.
So you cannot impact one recipe from another, this implies you cannot pick a version of one recipe from another, you can only say whether you're compatible with it.
Cheers,
Quentin
I think your major concern is “I have multiple version for opencv, but bibake installed the version 3.4.3 default.”.
It’s because layers have different layer priorities specified by BBFILE_PRIORITY in layer.conf, and for recipes with the same name in different layers, the one in higher priority layer will be selected regardless of the recipes’ versions.
In such case, you can set PREFERRED_VERSION to use the one you want.
Regards,
Qi
Sent: Tuesday, November 22, 2022 3:59 PM
To: yocto@...
Subject: [yocto] how to specify the package version via RDEPENDS in package group #bitbake
I have multiple version for opencv, but bibake installed the version 3.4.3 default.
=== Matching recipes: ===
opencv:
meta-rcar-gen3-adas 3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4
meta-oe 4.1.0
meta-rcar-gen3-adas 2.4.11+gitAUTOINC+707d10f115
meta-rcar-gen3-adas 3.2+gitAUTOINC+70bbf17b13
the
yocto offical documents mentioned the variable RDEPENDS
supports operator for specify versions.
then i specified the version to 4.1.0 for opencv in package group.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 4.1.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
Appeared the failure message, why??
The version list has v4.1.0, but the error message show nothing provides v4.1.0 for opencv
.
nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
ERROR: core-image-weston-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs --setopt=logdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp --repofrompath=oe-repo,/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo --nogpgcheck install bash coreutils dnf git htop i2c-tools inx-cluster kernel-module-qos matchbox-terminal omx-user-module optee-client packagegroup-base-extended packagegroup-bsp packagegroup-core-boot packagegroup-core-eclipse-debug packagegroup-core-sdk packagegroup-core-ssh-openssh packagegroup-core-standalone-sdk-target packagegroup-core-tools-debug packagegroup-core-tools-profile packagegroup-graphics-renesas-proprietary packagegroup-graphics-renesas-wayland packagegroup-gstreamer1.0-plugins packagegroup-user-requirements packagegroup-mm packagegroup-multimedia-kernel-modules packagegroup-multimedia-libs packagegroup-radio packagegroup-wayland-community psplash qosif-tp-user-module qosif-user-module rpm run-postinsts u-boot v4l-utils vim vspmif-tp-user-module weston weston-examples weston-init weston-xwayland locale-base-en-us locale-base-en-gb' returned 1:
DNF version: 4.2.2
cachedir: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Tue 22 Nov 2022 03:02:16 AM UTC.
Last metadata expiration check: 0:00:01 ago on Tue 22 Nov 2022 03:02:16 AM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: conflicting requests
- nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
ERROR: Logfile of failure stored in: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp/log.do_rootfs.855803
ERROR: Task (/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 9003 tasks of which 9002 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Successfully built the image after I try to set the version conditions as
> 2.0
, but the version still is v3.4.3 for opencv.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 2.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
How to specify the package version via RDEPENDS
in package group? thanks
Alex
I have multiple version for opencv, but bibake installed the version 3.4.3 default.
=== Matching recipes: ===
opencv:
meta-rcar-gen3-adas 3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4
meta-oe 4.1.0
meta-rcar-gen3-adas 2.4.11+gitAUTOINC+707d10f115
meta-rcar-gen3-adas 3.2+gitAUTOINC+70bbf17b13
the yocto offical documents mentioned the variable RDEPENDS supports operator for specify versions.
then i specified the version to 4.1.0 for opencv in package group.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 4.1.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
Appeared the failure message, why??
The version list has v4.1.0, but the error message show nothing provides v4.1.0 for opencv.
nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
ERROR: core-image-weston-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs --setopt=logdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp --repofrompath=oe-repo,/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo --nogpgcheck install bash coreutils dnf git htop i2c-tools inx-cluster kernel-module-qos matchbox-terminal omx-user-module optee-client packagegroup-base-extended packagegroup-bsp packagegroup-core-boot packagegroup-core-eclipse-debug packagegroup-core-sdk packagegroup-core-ssh-openssh packagegroup-core-standalone-sdk-target packagegroup-core-tools-debug packagegroup-core-tools-profile packagegroup-graphics-renesas-proprietary packagegroup-graphics-renesas-wayland packagegroup-gstreamer1.0-plugins packagegroup-user-requirements packagegroup-mm packagegroup-multimedia-kernel-modules packagegroup-multimedia-libs packagegroup-radio packagegroup-wayland-community psplash qosif-tp-user-module qosif-user-module rpm run-postinsts u-boot v4l-utils vim vspmif-tp-user-module weston weston-examples weston-init weston-xwayland locale-base-en-us locale-base-en-gb' returned 1:
DNF version: 4.2.2
cachedir: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Tue 22 Nov 2022 03:02:16 AM UTC.
Last metadata expiration check: 0:00:01 ago on Tue 22 Nov 2022 03:02:16 AM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: conflicting requests
- nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
ERROR: Logfile of failure stored in: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp/log.do_rootfs.855803
ERROR: Task (/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 9003 tasks of which 9002 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Successfully built the image after I try to set the version conditions as > 2.0, but the version still is v3.4.3 for opencv.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 2.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
How to specify the package version via RDEPENDS in package group? thanks
I have multiple version for opencv, but bibake installed the version 3.4.3 default.
=== Matching recipes: ===
opencv:
meta-rcar-gen3-adas 3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4
meta-oe 4.1.0
meta-rcar-gen3-adas 2.4.11+gitAUTOINC+707d10f115
meta-rcar-gen3-adas 3.2+gitAUTOINC+70bbf17b13
the yocto offical documents mentioned the variable RDEPENDS
supports operator for specify versions.
then i specified the version to 4.1.0 for opencv in package group.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 4.1.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
Appeared the failure message, why??
The version list has v4.1.0, but the error message show nothing provides v4.1.0 for opencv
.
nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
ERROR: core-image-weston-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs --setopt=logdir=/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp --repofrompath=oe-repo,/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo --nogpgcheck install bash coreutils dnf git htop i2c-tools inx-cluster kernel-module-qos matchbox-terminal omx-user-module optee-client packagegroup-base-extended packagegroup-bsp packagegroup-core-boot packagegroup-core-eclipse-debug packagegroup-core-sdk packagegroup-core-ssh-openssh packagegroup-core-standalone-sdk-target packagegroup-core-tools-debug packagegroup-core-tools-profile packagegroup-graphics-renesas-proprietary packagegroup-graphics-renesas-wayland packagegroup-gstreamer1.0-plugins packagegroup-user-requirements packagegroup-mm packagegroup-multimedia-kernel-modules packagegroup-multimedia-libs packagegroup-radio packagegroup-wayland-community psplash qosif-tp-user-module qosif-user-module rpm run-postinsts u-boot v4l-utils vim vspmif-tp-user-module weston weston-examples weston-init weston-xwayland locale-base-en-us locale-base-en-gb' returned 1:
DNF version: 4.2.2
cachedir: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Tue 22 Nov 2022 03:02:16 AM UTC.
Last metadata expiration check: 0:00:01 ago on Tue 22 Nov 2022 03:02:16 AM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: conflicting requests
- nothing provides opencv >= 4.1.0 needed by packagegroup-user-requirements-1.0-r1.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
ERROR: Logfile of failure stored in: /home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/tmp/work/h3ulcb-poky-linux/core-image-weston/1.0-r0/temp/log.do_rootfs.855803
ERROR: Task (/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 9003 tasks of which 9002 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/dell/workspace/yocto-v5.1.0-h3ulcb-kf/h3ulcb/build/../poky/meta/recipes-graphics/images/core-image-weston.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Successfully built the image after I try to set the version conditions as > 2.0
, but the version still is v3.4.3 for opencv.
SUMMARY = "Requirement packages"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = " \
opencv (>= 2.0)\
libopencv-core-dev \
libopencv-highgui-dev \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-ml-dev \
opencv-apps \
opencv-dev \
protobuf \
gdb \
libsdl2 \
libgpiod \
libgpiod-tools \
"
How to specify the package version via RDEPENDS
in package group? thanks