diff options
-rw-r--r-- | meta/conf/distro/include/default-providers.inc | 6 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/files/0001-update-alternatives-correctly-match-priority.patch (renamed from meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-update-alternatives_0.5.0.bb | 36 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb | 37 |
4 files changed, 46 insertions, 33 deletions
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index d18173c7449..e1895da51d3 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc @@ -12,8 +12,8 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" PREFERRED_PROVIDER_virtual/mesa ?= "mesa" -PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg-utils" -PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-utils-native" +PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg-update-alternatives" +PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-update-alternatives-native" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" PREFERRED_PROVIDER_virtual/base-utils ?= "busybox" PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel" @@ -23,7 +23,7 @@ PREFERRED_PROVIDER_virtual/make-native ?= "make-native" # # Default virtual runtime providers # -VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg" +VIRTUAL-RUNTIME_update-alternatives ?= "opkg-update-alternatives" VIRTUAL-RUNTIME_alsa-state ?= "alsa-state" VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt" VIRTUAL-RUNTIME_base-utils ?= "busybox" diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch b/meta/recipes-devtools/opkg-utils/files/0001-update-alternatives-correctly-match-priority.patch index 556d4ce5f5e..556d4ce5f5e 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch +++ b/meta/recipes-devtools/opkg-utils/files/0001-update-alternatives-correctly-match-priority.patch diff --git a/meta/recipes-devtools/opkg-utils/opkg-update-alternatives_0.5.0.bb b/meta/recipes-devtools/opkg-utils/opkg-update-alternatives_0.5.0.bb new file mode 100644 index 00000000000..2b49f8db383 --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-update-alternatives_0.5.0.bb @@ -0,0 +1,36 @@ +SUMMARY = "Utility for managing the alternatives system" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +PROVIDES += "virtual/update-alternatives" + +SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master \ + file://0001-update-alternatives-correctly-match-priority.patch \ + " +SRCREV = "9239541f14a2529b9d01c0a253ab11afa2822dab" + +S = "${WORKDIR}/git" + +inherit allarch + +do_compile() { + : +} + +do_install() { + install -d ${D}${bindir} + install update-alternatives ${D}${bindir} + + # Fix the hard-coded reference in the help output + sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g' +} + +pkg_postrm:${PN} () { + rm -rf $D${nonarch_libdir}/opkg/alternatives + rmdir $D${nonarch_libdir}/opkg || true +} + +BBCLASSEXTEND = "native nativesdk" + +CLEANBROKEN = "1" diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb index b27e3ded33b..24148d15455 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb @@ -1,22 +1,16 @@ SUMMARY = "Additional utilities for the opkg package manager" -SUMMARY:update-alternatives-opkg = "Utility for managing the alternatives system" SECTION = "base" HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986" -PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" -SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master \ - file://0001-update-alternatives-correctly-match-priority.patch \ - " +SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master" SRCREV = "9239541f14a2529b9d01c0a253ab11afa2822dab" S = "${WORKDIR}/git" -TARGET_CC_ARCH += "${LDFLAGS}" - -RDEPENDS:${PN} += "bash" +RDEPENDS:${PN} += "bash opkg-update-alternatives" inherit perlnative @@ -24,42 +18,25 @@ inherit perlnative PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold" PYTHONRDEPS:class-native = "" -PACKAGECONFIG = "python update-alternatives" +PACKAGECONFIG = "python" PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}" -PACKAGECONFIG[update-alternatives] = ",,," do_install() { oe_runmake PREFIX=${prefix} DESTDIR=${D} install - if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then - rm -f "${D}${bindir}/update-alternatives" - fi -} -do_install:append:class-target() { + # update-alternatives is now packaged by opkg-update-alternatives + rm -f ${D}${bindir}/update-alternatives + + # Remove python scripts if not enabled if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm fi - - if [ -e "${D}${bindir}/update-alternatives" ]; then - sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g' - fi } # These are empty and will pull python3-dev into images where it wouldn't # have been otherwise, so don't generate them. PACKAGES:remove = "${PN}-dev ${PN}-staticdev" -PACKAGES =+ "update-alternatives-opkg" -FILES:update-alternatives-opkg = "${bindir}/update-alternatives" -RPROVIDES:update-alternatives-opkg = "update-alternatives update-alternatives-cworth" -RREPLACES:update-alternatives-opkg = "update-alternatives-cworth" -RCONFLICTS:update-alternatives-opkg = "update-alternatives-cworth" - -pkg_postrm:update-alternatives-opkg() { - rm -rf $D${nonarch_libdir}/opkg/alternatives - rmdir $D${nonarch_libdir}/opkg || true -} - BBCLASSEXTEND = "native nativesdk" CLEANBROKEN = "1" |