From: Mark Hatle Date: Tue, 15 May 2012 23:35:04 +0000 (-0500) Subject: ncurses: use new update-alternatives X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~41329 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=54a92bdd0555d776efe92f7cf57a75039562556a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git ncurses: use new update-alternatives Signed-off-by: Mark Hatle --- diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index b0311196eeb..fbfbf0c7353 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -166,12 +166,6 @@ shell_do_install() { rm -f ${D}${libdir}/terminfo - if [ "${PN}" = "ncurses" ]; then - mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} - mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} - fi - - # create linker scripts for libcurses.so and libncurses to # link against -ltinfo when needed. Some builds might break # else when '-Wl,--no-copy-dt-needed-entries' has been set in @@ -220,19 +214,11 @@ python populate_packages_prepend () { } -pkg_postinst_ncurses-tools () { - if [ "${PN}" = "ncurses" ]; then - update-alternatives --install ${bindir}/clear clear clear.${PN} 100 - update-alternatives --install ${bindir}/reset reset reset.${PN} 100 - fi -} +inherit update-alternatives -pkg_prerm_ncurses-tools () { - if [ "${PN}" = "ncurses" ]; then - update-alternatives --remove clear clear.${PN} - update-alternatives --remove reset reset.${PN} - fi -} +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_ncurses-tools = "clear reset" BBCLASSEXTEND = "native nativesdk"