Patchwork [05/19] less: use new update-alternatives

login
register
mail settings
Submitter Morgan Little
Date Aug. 1, 2012, 2:12 p.m.
Message ID <1343830340-25351-6-git-send-email-morgan.little@windriver.com>
Download mbox | patch
Permalink /patch/33533/
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/less/less_444.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

 
@@ -37,6 +37,6 @@
 do_install () {
         mv ${D}${bindir}/less ${D}${bindir}/less.${BPN}
 }
 
-ALTERNATIVE_NAME = "less"
-ALTERNATIVE_PATH = "less.${BPN}"
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_TARGET[less] = "${bindir}/less.${BPN}"
 ALTERNATIVE_PRIORITY = "100"
Mark Hatle - Aug. 1, 2012, 3:14 p.m.
On 8/1/12 9:12 AM, Morgan Little wrote:
>
> Signed-off-by: Morgan Little <morgan.little@windriver.com>
> ---
>   meta/recipes-extended/less/less_444.bb |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-extended/less/less_444.bb b/meta/recipes-extended/less/less_444.bb
> index 146b4fd..d18293d 100644
> --- a/meta/recipes-extended/less/less_444.bb
> +++ b/meta/recipes-extended/less/less_444.bb
> @@ -23,7 +23,7 @@
>   LICENSE = "GPLv3+ | BSD-2-Clause"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
>                       file://LICENSE;md5=1237c0f825bb36122b0b2b486ffbe6be"
>   DEPENDS = "ncurses"
> -PR = "r2"
> +PR = "r3"
>
>   SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
>
> @@ -37,6 +37,6 @@
>   do_install () {
>           mv ${D}${bindir}/less ${D}${bindir}/less.${BPN}
>   }
>
> -ALTERNATIVE_NAME = "less"
> -ALTERNATIVE_PATH = "less.${BPN}"
> +ALTERNATIVE_${PN} = "less"
> +ALTERNATIVE_TARGET[less] = "${bindir}/less.${BPN}"
>   ALTERNATIVE_PRIORITY = "100"
>

The mv in the do_install is not needed, once it is removed the 
ALTERNATIVE_TARGET[LESS] is no longer needed either.

Patch

diff --git a/meta/recipes-extended/less/less_444.bb b/meta/recipes-extended/less/less_444.bb
index 146b4fd..d18293d 100644
--- a/meta/recipes-extended/less/less_444.bb
+++ b/meta/recipes-extended/less/less_444.bb
@@ -23,7 +23,7 @@ 
 LICENSE = "GPLv3+ | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     file://LICENSE;md5=1237c0f825bb36122b0b2b486ffbe6be"
 DEPENDS = "ncurses"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"