* [PATCH] bc: use update-alternatives to make dc play nice with busybox
@ 2012-03-28 6:11 Denys Dmytriyenko
2012-03-28 8:38 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2012-03-28 6:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Denys Dmytriyenko
From: Denys Dmytriyenko <denys@ti.com>
busybox' default configuration enables dc app, which bc also provides,
setup update-alternatives to resolve the conflict.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
meta/recipes-extended/bc/bc_1.06.bb | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
index 02915e1..d8d8f4d 100644
--- a/meta/recipes-extended/bc/bc_1.06.bb
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -11,11 +11,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
SECTION = "base"
DEPENDS = "flex"
-PR = "r0"
+PR = "r1"
SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
-inherit autotools
+do_install_append () {
+ mv ${D}${bindir}/dc ${D}${bindir}/dc.${PN}
+}
+
+inherit autotools update-alternatives
+
+ALTERNATIVE_NAME = "dc"
+ALTERNATIVE_LINK = "${bindir}/dc"
+ALTERNATIVE_PATH = "${bindir}/dc.${PN}"
+ALTERNATIVE_PRIORITY = "100"
--
1.7.8.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bc: use update-alternatives to make dc play nice with busybox
2012-03-28 6:11 [PATCH] bc: use update-alternatives to make dc play nice with busybox Denys Dmytriyenko
@ 2012-03-28 8:38 ` Richard Purdie
2012-03-28 23:35 ` Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2012-03-28 8:38 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Denys Dmytriyenko
On Wed, 2012-03-28 at 02:11 -0400, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
>
> busybox' default configuration enables dc app, which bc also provides,
> setup update-alternatives to resolve the conflict.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
> meta/recipes-extended/bc/bc_1.06.bb | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
> index 02915e1..d8d8f4d 100644
> --- a/meta/recipes-extended/bc/bc_1.06.bb
> +++ b/meta/recipes-extended/bc/bc_1.06.bb
> @@ -11,11 +11,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
>
> SECTION = "base"
> DEPENDS = "flex"
> -PR = "r0"
> +PR = "r1"
>
> SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
>
> SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
> SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
>
> -inherit autotools
> +do_install_append () {
> + mv ${D}${bindir}/dc ${D}${bindir}/dc.${PN}
> +}
> +
> +inherit autotools update-alternatives
> +
> +ALTERNATIVE_NAME = "dc"
> +ALTERNATIVE_LINK = "${bindir}/dc"
> +ALTERNATIVE_PATH = "${bindir}/dc.${PN}"
> +ALTERNATIVE_PRIORITY = "100"
I think you should just be able to do:
"""
ALTERNATIVE_LINKS = "${bindir}/dc"
ALTERNATIVE_PRIORITY = "100"
inherit autotools update-alternatives
"""
?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bc: use update-alternatives to make dc play nice with busybox
2012-03-28 8:38 ` Richard Purdie
@ 2012-03-28 23:35 ` Denys Dmytriyenko
2012-03-29 9:50 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2012-03-28 23:35 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Denys Dmytriyenko
On Wed, Mar 28, 2012 at 09:38:04AM +0100, Richard Purdie wrote:
> On Wed, 2012-03-28 at 02:11 -0400, Denys Dmytriyenko wrote:
> > From: Denys Dmytriyenko <denys@ti.com>
> >
> > busybox' default configuration enables dc app, which bc also provides,
> > setup update-alternatives to resolve the conflict.
> >
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> > meta/recipes-extended/bc/bc_1.06.bb | 13 +++++++++++--
> > 1 files changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
> > index 02915e1..d8d8f4d 100644
> > --- a/meta/recipes-extended/bc/bc_1.06.bb
> > +++ b/meta/recipes-extended/bc/bc_1.06.bb
> > @@ -11,11 +11,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
> >
> > SECTION = "base"
> > DEPENDS = "flex"
> > -PR = "r0"
> > +PR = "r1"
> >
> > SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
> >
> > SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
> > SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
> >
> > -inherit autotools
> > +do_install_append () {
> > + mv ${D}${bindir}/dc ${D}${bindir}/dc.${PN}
> > +}
> > +
> > +inherit autotools update-alternatives
> > +
> > +ALTERNATIVE_NAME = "dc"
> > +ALTERNATIVE_LINK = "${bindir}/dc"
> > +ALTERNATIVE_PATH = "${bindir}/dc.${PN}"
> > +ALTERNATIVE_PRIORITY = "100"
>
>
> I think you should just be able to do:
>
> """
> ALTERNATIVE_LINKS = "${bindir}/dc"
> ALTERNATIVE_PRIORITY = "100"
>
> inherit autotools update-alternatives
> """
>
> ?
Yes, quite right. I see plenty of other recipes do it the hard way though...
--
Denys
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bc: use update-alternatives to make dc play nice with busybox
2012-03-28 23:35 ` Denys Dmytriyenko
@ 2012-03-29 9:50 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2012-03-29 9:50 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Denys Dmytriyenko
On Wed, 2012-03-28 at 19:35 -0400, Denys Dmytriyenko wrote:
> On Wed, Mar 28, 2012 at 09:38:04AM +0100, Richard Purdie wrote:
> > On Wed, 2012-03-28 at 02:11 -0400, Denys Dmytriyenko wrote:
> > > -inherit autotools
> > > +do_install_append () {
> > > + mv ${D}${bindir}/dc ${D}${bindir}/dc.${PN}
> > > +}
> > > +
> > > +inherit autotools update-alternatives
> > > +
> > > +ALTERNATIVE_NAME = "dc"
> > > +ALTERNATIVE_LINK = "${bindir}/dc"
> > > +ALTERNATIVE_PATH = "${bindir}/dc.${PN}"
> > > +ALTERNATIVE_PRIORITY = "100"
> >
> >
> > I think you should just be able to do:
> >
> > """
> > ALTERNATIVE_LINKS = "${bindir}/dc"
> > ALTERNATIVE_PRIORITY = "100"
> >
> > inherit autotools update-alternatives
> > """
> Yes, quite right. I see plenty of other recipes do it the hard way though...
All the more reason to get some better examples out there! :)
Thanks for resending.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-29 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 6:11 [PATCH] bc: use update-alternatives to make dc play nice with busybox Denys Dmytriyenko
2012-03-28 8:38 ` Richard Purdie
2012-03-28 23:35 ` Denys Dmytriyenko
2012-03-29 9:50 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.