BAD_RECOMMENDATIONS with opkg and multiple architectures
Hi,
We discovered an issue when using BAD_RECOMMENDATIONS while having multiple architectures in one build directory and using the opkg package format. In the problem at hand, we try to get rid of busybox-syslog, as many images do, through BAD_RECOMMENDATIONS.
However, the package ended up in the image anyway. We discovered that in daisy as well as in dizzy branch. In daisy branch, there is another, related bug, where the multiple packages in BAD_RECOMMENDATIONS were not handled correctly:
http://patchwork.openembedded.org/patch/82167/
However even with that patch, the package gets still installed. I digged a bit deeper, and found that the opkg status file in the images rootfs folder gets populated by handle_bad_recommendations with the expected status "Status: deinstall hold not-installed". However, there were three packages, for each architecture which the feed had a package for (which was armv7ahf-vfp, armv7ahf-vfp-neon and armv7at2hf-vfp-neon in the case at hand).
In the install steps, the package gets installed despite of the status entries above. It looks like opkg can't handle multiple architecture entries in the status file....
After cleaning up the package for all architectures and restart the build again, the package was not installed anymore and the do_rootfs log showed the expected output:
Installing busybox (1.22.1-r0) to root...
Downloading file:/build/ags/oe-core/build/out-eglibc/deploy/ipk/armv7at2hf-vfp-neon/busybox_1.22.1-r0_armv7at2hf-vfp-neon.ipk.
busybox: ignoring recommendation for busybox-syslog at user request
busybox: unsatisfied recommendation for busybox-syslog
Installing update-alternatives-opkg (0.1.8+git0+c33b217016-r0) to
root...
Ideas how to solve that properly? Maybe create the status file with packages of the current architecture only?
--
Stefan
Just verified the issue again, building a machine with architecture armv7at2hf-vfp and one with armv7at2hf-vfp-neon in a row. The second machine gets the package installed despite the correct status file:
=> /var/lib/opkg/status just after handle_bad_recommendations
Package: busybox-syslog
Version: 1.22.1-r0
Depends: update-alternatives-opkg
Provides: busybox-syslog-systemd
Replaces: busybox-syslog-systemd
Conflicts: busybox-syslog-systemd
Status: deinstall hold not-installed
Section: base
Architecture: armv7at2hf-vfp
Maintainer: Angstrom Developers <[email protected]>
MD5Sum: be66fec1a91a3c658022f3c1a5fad72a
Size: 2580
Filename: busybox-syslog_1.22.1-r0_armv7at2hf-vfp.ipk Source:
http://www.busybox.net/downloads/busybox-1.22.1.tar.bz2;name=tarball
file://get_header_tar.patch file://busybox-appletlib-dependency.patch file://busybox-udhcpc-no_deconfig.patch file://find-touchscreen.sh file://busybox-cron file://busybox-httpd file://busybox-udhcpd file://default.script file://simple.script file://hwclock.sh file://mount.busybox file://syslog file://syslog-startup.conf file://syslog.conf file://busybox-syslog.default file://mdev file://mdev.conf file://umount.busybox file://defconfig file://busybox-syslog.service.in file://busybox-klogd.service.in file://fail_on_no_media.patch file://run-ptest file://inetd.conf file://inetd file://login-utilities.cfg file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch file://busybox-syslog.service.in file://busybox-klogd.service.in
Description: Tiny versions of many common UNIX utilities in a single small executable
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most
of
the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full- featured GNU cousins; however, the options that are included provide
the
expected functionality and behave very much like their GNU
counterparts.
BusyBox provides a fairly complete POSIX environment for any small or embedded system.
Package: busybox-syslog
Version: 1.22.1-r0
Depends: update-alternatives-opkg
Provides: busybox-syslog-systemd
Replaces: busybox-syslog-systemd
Conflicts: busybox-syslog-systemd
Status: deinstall hold not-installed
Section: base
Architecture: armv7at2hf-vfp-neon
Maintainer: Angstrom Developers <[email protected]>
MD5Sum: 2f8312da8f8557a25770852c0708aa8b
Size: 2584
Filename: busybox-syslog_1.22.1-r0_armv7at2hf-vfp-neon.ipk Source:
http://www.busybox.net/downloads/busybox-1.22.1.tar.bz2;name=tarball
file://get_header_tar.patch file://busybox-appletlib-dependency.patch file://busybox-udhcpc-no_deconfig.patch file://find-touchscreen.sh file://busybox-cron file://busybox-httpd file://busybox-udhcpd file://default.script file://simple.script file://hwclock.sh file://mount.busybox file://syslog file://syslog-startup.conf file://syslog.conf file://busybox-syslog.default file://mdev file://mdev.conf file://umount.busybox file://defconfig file://busybox-syslog.service.in file://busybox-klogd.service.in file://fail_on_no_media.patch file://run-ptest file://inetd.conf file://inetd file://login-utilities.cfg file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch file://busybox-syslog.service.in file://busybox-klogd.service.in
Description: Tiny versions of many common UNIX utilities in a single small executable
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most
of
the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full- featured GNU cousins; however, the options that are included provide
the
expected functionality and behave very much like their GNU
counterparts.
BusyBox provides a fairly complete POSIX environment for any small or embedded system.
=> /var/lib/opkg/status file at end
...
Package: busybox-syslog
Version: 1.22.1-r0
Depends: update-alternatives-opkg
Provides: busybox-syslog-systemd
Replaces: busybox-syslog-systemd
Conflicts: busybox-syslog-systemd
Status: deinstall hold not-installed
Architecture: armv7at2hf-vfp-neon
Package: busybox-syslog
Version: 1.22.1-r0
Depends: update-alternatives-opkg
Provides: busybox-syslog-systemd
Replaces: busybox-syslog-systemd
Conflicts: busybox-syslog-systemd
Status: install ok installed
Architecture: armv7at2hf-vfp-neon
Installed-Time: 1426805964
Auto-Installed: yes
...
Interesting though, that the status file in the end contains the package with the right architecture and status ("Status: deinstall hold not-installed")...
But opkg installs the package happily:
=> log.do_rootfs
...
Installing busybox (1.22.1-r0) to root...
Downloading file:/build/ags/oe-core/build/out-eglibc/deploy/ipk/armv7at2hf-vfp-neon/busybox_1.22.1-r0_armv7at2hf-vfp-neon.ipk. Installing update-alternatives-opkg (0.1.8+git0+c33b217016-r0) to
root...
Downloading file:/build/ags/oe-core/build/out-eglibc/deploy/ipk/armv7at2hf-vfp-neon/update-alternatives-opkg_0.1.8+git0+c33b217016-r0_armv7at2hf-vfp-neon.ipk. Installing update-rc.d (0.7-r6) to root...
Downloading
file:/build/ags/oe-core/build/out-eglibc/deploy/ipk/all/update-rc.d_0.7-r6_all.ipk.
Installing busybox-syslog (1.22.1-r0) to root...
Downloading file:/build/ags/oe-core/build/out-eglibc/deploy/ipk/armv7at2hf-vfp-neon/busybox-syslog_1.22.1-r0_armv7at2hf-vfp-neon.ipk.
...
--
Stefan