]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
opkg: use new update-alternatives
authorMark Hatle <mark.hatle@windriver.com>
Mon, 21 May 2012 21:17:22 +0000 (16:17 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 May 2012 09:45:33 +0000 (10:45 +0100)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
meta/recipes-devtools/opkg/opkg.inc

index 14083d0cd12487fd6b21a651da5aa2116294cf5d..5c7cad36650dbb9b4a9a667589a2826a10945943 100644 (file)
@@ -11,7 +11,7 @@ DEPENDS_virtclass-native = "curl-native"
 DEPENDS_virtclass-nativesdk = "curl-nativesdk"
 
 PE = "1"
-INC_PR = "r9"
+INC_PR = "r10"
 
 FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg"
 
@@ -64,15 +64,14 @@ rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 " > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
        chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 fi
-
-update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
-pkg_postrm_${PN} () {
-#!/bin/sh
-update-alternatives --remove opkg ${bindir}/opkg-cl
-}
+inherit update-alternatives
 
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "opkg"
+ALTERNATIVE_LINK_NAME[opkg] = "${bindir}/opkg"
+ALTERNATIVE_TARGET[opkg] = "${bindir}/opkg-cl"
 
 BBCLASSEXTEND = "native nativesdk"