Patchwork [CONSOLIDATED,REQUEST,23/64] which: cleanup update-alternatives deprecated code

login
register
mail settings
Submitter Saul Wold
Date Aug. 14, 2012, 12:13 p.m.
Message ID <5cc29e574d0e2570cf84373b5e69fce3ec2f0092.1344946189.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/34513/
State Accepted
Commit 929d7ec6ad5a27b6fcc6ac8c0af1a9f25a7ff6df
Headers show

Comments

Saul Wold - Aug. 14, 2012, 12:13 p.m.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/which/which_2.18.bb |    8 ++------
 meta/recipes-extended/which/which_2.20.bb |   10 ++--------
 2 files changed, 4 insertions(+), 14 deletions(-)

Patch

diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
index d54e776..27a567c 100644
--- a/meta/recipes-extended/which/which_2.18.bb
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -9,7 +9,7 @@  BUGTRACKER = "n/a"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
            file://fix_name_conflict_group_member.patch"
@@ -26,11 +26,7 @@  do_configure_prepend() {
 	NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
 	sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
 }
-do_install_append() {
-	mv ${D}/${bindir}/which ${D}/${bindir}/which.${BPN}
-}
 
-ALTERNATIVE_NAME = "which"
-ALTERNATIVE_PATH = "which.${BPN}"
+ALTERNATIVE_${PN} = "which"
 ALTERNATIVE_PRIORITY = "100"
 
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb
index 9b43943..312688f 100644
--- a/meta/recipes-extended/which/which_2.20.bb
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -8,7 +8,7 @@  DEPENDS     = "cwautomacros-native"
 
 inherit autotools update-alternatives
 
-PR = "r2"
+PR = "r3"
 
 EXTRA_OECONF = "--disable-iberty"
 
@@ -22,11 +22,5 @@  do_configure_prepend() {
 	sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am
 }
 
-do_install() {
-	autotools_do_install
-	mv ${D}${bindir}/which ${D}${bindir}/which.${BPN}
-}
-
-ALTERNATIVE_NAME = "which"
-ALTERNATIVE_PATH = "which.${BPN}"
+ALTERNATIVE_${PN} = "which"
 ALTERNATIVE_PRIORITY = "100"