Patchwork [01/19] tinylogin: use new update-alternatives

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

 
@@ -42,7 +42,7 @@
 do_install_append () {
         mv ${D}${base_sbindir}/getty ${D}${base_sbindir}/getty.${BPN}
 }
 
-ALTERNATIVE_NAME = "getty"
-ALTERNATIVE_LINK = "${base_sbindir}/getty"
-ALTERNATIVE_PATH = "${base_sbindir}/getty.${BPN}"
+ALTERNATIVE_${PN} = "getty"
+ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
+ALTERNATIVE_TARGET[getty] =  "${base_sbindir}/getty.${BPN}"
 ALTERNATIVE_PRIORITY = "80"
Mark Hatle - Aug. 1, 2012, 3:12 p.m.
On 8/1/12 9:12 AM, Morgan Little wrote:
>
> Signed-off-by: Morgan Little <morgan.little@windriver.com>
> ---
>   meta/recipes-core/tinylogin/tinylogin_1.4.bb |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-core/tinylogin/tinylogin_1.4.bb b/meta/recipes-core/tinylogin/tinylogin_1.4.bb
> index 195f0c7..b86141f 100644
> --- a/meta/recipes-core/tinylogin/tinylogin_1.4.bb
> +++ b/meta/recipes-core/tinylogin/tinylogin_1.4.bb
> @@ -7,7 +7,7 @@
>   and groups on an embedded system."
>   HOMEPAGE = "http://tinylogin.busybox.net/"
>   LICENSE = "GPLv2"
>   LIC_FILES_CHKSUM="file://LICENSE;md5=f1060fa3a366f098b5b1d8c2077ba269"
> -PR = "r8"
> +PR = "r9"
>
>   inherit update-alternatives
>
> @@ -42,7 +42,7 @@
>   do_install_append () {
>           mv ${D}${base_sbindir}/getty ${D}${base_sbindir}/getty.${BPN}
>   }
>
> -ALTERNATIVE_NAME = "getty"
> -ALTERNATIVE_LINK = "${base_sbindir}/getty"
> -ALTERNATIVE_PATH = "${base_sbindir}/getty.${BPN}"
> +ALTERNATIVE_${PN} = "getty"
> +ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
> +ALTERNATIVE_TARGET[getty] =  "${base_sbindir}/getty.${BPN}"
>   ALTERNATIVE_PRIORITY = "80"
>

The above will work.. but it would be better to (perhaps a second commit?):

remove the do_install_append, it is no longer necessary

Once you do that, then you may remove the "ALTERNARTIVE_TARGET[getty]" that you 
added, as it will automatically be configured as such by the update-alternatives 
class.

--Mark

Patch

diff --git a/meta/recipes-core/tinylogin/tinylogin_1.4.bb b/meta/recipes-core/tinylogin/tinylogin_1.4.bb
index 195f0c7..b86141f 100644
--- a/meta/recipes-core/tinylogin/tinylogin_1.4.bb
+++ b/meta/recipes-core/tinylogin/tinylogin_1.4.bb
@@ -7,7 +7,7 @@ 
 and groups on an embedded system."
 HOMEPAGE = "http://tinylogin.busybox.net/"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM="file://LICENSE;md5=f1060fa3a366f098b5b1d8c2077ba269"
-PR = "r8"
+PR = "r9"
 
 inherit update-alternatives