Patchwork [12/19] which: use new update-alternatives

login
register
mail settings
Submitter Morgan Little
Date Aug. 1, 2012, 2:12 p.m.
Message ID <1343830340-25351-13-git-send-email-morgan.little@windriver.com>
Download mbox | patch
Permalink /patch/33553/
State New
Headers show

Comments

Morgan Little - Aug. 1, 2012, 2:12 p.m.
Signed-off-by: Morgan Little <morgan.little@windriver.com>
---
 meta/recipes-extended/which/which_2.18.bb |    6 +++---
 meta/recipes-extended/which/which_2.20.bb |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

 
@@ -27,6 +27,6 @@
 do_install() {
 	mv ${D}${bindir}/which ${D}${bindir}/which.${BPN}
 }
 
-ALTERNATIVE_NAME = "which"
-ALTERNATIVE_PATH = "which.${BPN}"
+ALTERNATIVE_${PN} = "which"
+ALTERNATIVE_TARGET[which] = "${bindir}/which.${BPN}"
 ALTERNATIVE_PRIORITY = "100"
Mark Hatle - Aug. 1, 2012, 3:17 p.m.
On 8/1/12 9:12 AM, Morgan Little wrote:
>
> Signed-off-by: Morgan Little <morgan.little@windriver.com>
> ---
>   meta/recipes-extended/which/which_2.18.bb |    6 +++---
>   meta/recipes-extended/which/which_2.20.bb |    6 +++---
>   2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
> index d54e776..db2d7dc 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"
> @@ -30,7 +30,7 @@
>   do_install_append() {
>   	mv ${D}/${bindir}/which ${D}/${bindir}/which.${BPN}
>   }
>
> -ALTERNATIVE_NAME = "which"
> -ALTERNATIVE_PATH = "which.${BPN}"
> +ALTERNATIVE_${PN} = "which"
> +ALTERNATIVE_TARGET[which] = "${bindir}/which.${BPN}"
>   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..21b4bec 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"
>
> @@ -27,6 +27,6 @@
>   do_install() {
>   	mv ${D}${bindir}/which ${D}${bindir}/which.${BPN}
>   }
>
> -ALTERNATIVE_NAME = "which"
> -ALTERNATIVE_PATH = "which.${BPN}"
> +ALTERNATIVE_${PN} = "which"
> +ALTERNATIVE_TARGET[which] = "${bindir}/which.${BPN}"
>   ALTERNATIVE_PRIORITY = "100"
>

Remove the mv in do_install, and the ALTERNATIVE_TARGET[which] is no longer needed.

--Mark

Patch

diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
index d54e776..db2d7dc 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"
@@ -30,7 +30,7 @@ 
 do_install_append() {
 	mv ${D}/${bindir}/which ${D}/${bindir}/which.${BPN}
 }
 
-ALTERNATIVE_NAME = "which"
-ALTERNATIVE_PATH = "which.${BPN}"
+ALTERNATIVE_${PN} = "which"
+ALTERNATIVE_TARGET[which] = "${bindir}/which.${BPN}"
 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..21b4bec 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"