Skip to content

opkg and BAD_RECOMMENDATIONS in thud 2.6.2

Quentin Schulz poky 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2opkg: add --ignore-recommends flagmeta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch meta/recipes-devtools/opkg/opkg_0.3.6.bb+261 -00 replies
2/2OpkgPM: use --add-ignore-recommends to process BAD_RECOMMENDATIONSmeta/lib/oe/package_manager.py meta/lib/oe/rootfs.py+2 -410 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [thud] [PATCH 0/2] opkg and BAD_RECOMMENDATIONS in thud 2.6.2

Hi all,

I've been hit with a rather unsettling bug when building an image with PACKAGE_CLASSES = "ipk" in Thud 2.6.2.

The error message is the following:
ERROR: meh-1.0-r0 do_rootfs: Unable to install packages. Command
'/tmp/yocto/temp/work/machine-poky-linux/meh/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /tmp/yocto/temp/work/machine-poky-linux/meh/1.0-r0/opkg.conf -t /tmp/yocto/temp/work/machine-poky-linux/meh/1.0-r0/temp/ipktemp/ -o /tmp/yocto/temp/work/machine-poky-linux/meh/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version --force-maintainer --force-overwrite install packagegroup-base-extended packagegroup-core-boot plop run-postinsts' returned 2:
Collected errors:
* Solver encountered 2 problem(s):
* Problem 1/2:
* - nothing provides bluez5 needed by plop-1.0-r0.aarch64
*
* Solution 1:
* - do not ask to install a package providing plop

* Problem 2/2:
* - nothing provides bluez5 needed by packagegroup-base-bluetooth-1.0-r83.stream1832prime
*
* Solution 1:
* - do not ask to install a package providing packagegroup-base-extended

ERROR: meh-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /tmp/yocto/temp/work/machine-poky-linux/meh/1.0-r0/temp/log.do_rootfs.30869
ERROR: Task (/media/qschulz/yocto/build/oe/recipes-images/nsdk/meh.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3059 tasks of which 3046 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/media/qschulz/yocto/build/oe/recipes-images/nsdk/meh.bb:do_rootfs
Summary: There were 7 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

I could reproduce it with an image meh.bb:
inherit core-image

CORE_IMAGE_EXTRA_INSTALL += "plop"

BAD_RECOMMENDATIONS += "bluez5"

with plop.bb being:
DESCRIPTION = "Plap"
LICENSE = "CLOSED"

RDEPENDS_${PN} += "bluez5"

do_install() {
        install -d ${D}${bindir}
        echo "plip" > ${D}${bindir}/plep
}

I took me a while to find out that it's an issue with opkg itself and nothing could be done in Yocto to fix it but I found the three following patches in yocto-2.7:

https://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d8e12f2bfc4deaa0dc7530cf3af905e18e8037f6
https://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c76c50df6498d85e7a6254002ff8f5e0ef3e67f7
https://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5bcb626cf49d2295ccca45d6fc7e1617cca932d6

With those three applied on top of thud 2.6.2, my image is built without complaints.

Please apply those backported patches for next Thud releases.

Thanks,
Quentin

Alejandro del Castillo (2):
opkg: add --ignore-recommends flag
OpkgPM: use --add-ignore-recommends to process BAD_RECOMMENDATIONS

 meta/lib/oe/package_manager.py                |  41 +--
 meta/lib/oe/rootfs.py                         |   2 -
 ...pkg-add-add-ignore-recommends-option.patch | 260 ++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_0.3.6.bb      |   1 +
 4 files changed, 263 insertions(+), 41 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
Signature · 1 line
2.17.1