rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
PATCH 1/1 rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
New opkg requires full and correct package name, version, revision and architecture to be specified when requiring de-installation of a package. Collect that info from opkg-info.
--- classes/rootfs_ipk.bbclass | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
classes/rootfs_ipk.bbclass +9 -6
@@ -36,16 +36,19 @@ fakeroot rootfs_ipk_do_rootfs () { mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/ STATUS=${IMAGE_ROOTFS}${libdir}/opkg/status + + opkg-cl ${IPKG_ARGS} update + # prime the status file with bits that we don't want for i in ${BAD_RECOMMENDATIONS}; do - echo "Package: $i" >> $STATUS - echo "Architecture: ${TARGET_ARCH}" >> $STATUS - echo "Status: deinstall ok not-installed" >> $STATUS - echo >> $STATUS + infln="`opkg-cl ${IPKG_ARGS} info $i | grep -e '^Package:' -e '^Architecture:' -e '^Version:'`" + if [ ! -z "$infln" ]; then + echo "$infln" >> $STATUS + echo "Status: deinstall ok not-installed" >> $STATUS + echo >> $STATUS + fi done - opkg-cl ${IPKG_ARGS} update - # Uclibc builds don't provide this stuff... if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then if [ ! -z "${LINGUAS_INSTALL}" ]; then
Signature · 1 line
1.6.3.3
Quoted 3 lines · Denys Dmytriyenko
New opkg requires full and correct package name, version, revision and architecture to be specified when requiring de-installation of a package. Collect that info from opkg-info.
This seems like a bug in opkg. Would it not be better to fix it there?
p.
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Denys Dmytriyenko
New opkg requires full and correct package name, version, revision and architecture to be specified when requiring de-installation of a package. Collect that info from opkg-info.
This seems like a bug in opkg. Would it not be better to fix it there?
p.
This is an unintended side effect of other changes, however I'm not sure that I consider it inappropriate behaviour. That status does apply to a particular package version, does it not?
-Graham
Quoted 3 lines · Graham Gower
This is an unintended side effect of other changes, however I'm not sure that I consider it inappropriate behaviour. That status does apply to a particular package version, does it not?
No, the SW_xx flags should apply to any version and architecture rather than being nailed down to a specific tuple. Otherwise, these flags would be subverted as soon as a new version appears in the feed.
p.
Quoted 8 lines · Phil Blundell
Quoted 3 lines · Graham Gower
This is an unintended side effect of other changes, however I'm not sure that I consider it inappropriate behaviour. That status does apply to a particular package version, does it not?
No, the
SW_xxflags should apply to any version and architecture rather than being nailed down to a specific tuple. Otherwise, these flags would be subverted as soon as a new version appears in the feed.
The thing is, those SW_xx flags are not preserved anyway - the status file is primed with BAD_RECOMMENDATIONS (Status: deinstall), but later gets overwritten by the list of only installed packages. Of course, "deinstall" packages are being skipped, but they are not preserved in the status file for later use...
But, on the other hand, if there are multiple versions of the package present in the deploy/feed, then it will, probably, deinstall one version and install another one, which is not the correct behavior.
Signature · 1 line
Denys
Quoted 5 lines · Denys Dmytriyenko
The thing is, those
SW_xxflags are not preserved anyway - the status file is primed withBAD_RECOMMENDATIONS(Status: deinstall), but later gets overwritten by the list of only installed packages. Of course, "deinstall" packages are being skipped, but they are not preserved in the status file for later use...
Ah. If that's happening then that is also a bug. Are you saying that opkg basically throws away anything that isn't SS_INSTALLED when it writes out the status file? That is definitely no good: it ought to preserve all the SW_xx values that are set in the status file, essentially indefinitely.
Quoted 3 lines
But, on the other hand, if there are multiple versions of the package present in the deploy/feed, then it will, probably, deinstall one version and install another one, which is not the correct behavior.
Yeah, that would also be pretty broken.
p.