在包组中使用RDEPENDS指定版本

问题描述 投票:0回答:1

我有多个opencv版本,但bibake默认安装了3.4.3版本。

=== 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

yocto官方文档提到了变量

RDEPENDS
支持指定版本的操作符。

然后我在包组中将opencv的版本指定为4.1.0。

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 \
"

出现失败信息,为什么??

版本列表有v4.1.0,但错误信息显示

nothing provides v4.1.0 for opencv

没有提供 packagegroup-user-requirements-1.0-r1.noarch 所需的 opencv >= 4.1.0

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.

我尝试将版本条件设置为

> 2.0
后成功构建了镜像,但版本仍然是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 \
"

如何指定包组中的包版本?谢谢


yocto bitbake openembedded
1个回答
0
投票

您需要在 local.conf 中设置 PREFERRED_VERSION_package = "version"。 对于你的情况:

PREFERRED_VERSION_opencv =“4.1.0”

© www.soinside.com 2019 - 2024. All rights reserved.