Patchwork [v2,4/4] ofono: Move do_install() to ofono recipe file

login
register
mail settings
Submitter Jukka Rissanen
Date Aug. 1, 2013, 3:01 p.m.
Message ID <1375369300-13471-5-git-send-email-jukka.rissanen@linux.intel.com>
Download mbox | patch
Permalink /patch/54919/
State New
Headers show

Comments

Jukka Rissanen - Aug. 1, 2013, 3:01 p.m.
This allows the ofono.inc file to be used by a recipe that does
not have or use ofono init script.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
 meta/recipes-connectivity/ofono/ofono.inc     | 5 -----
 meta/recipes-connectivity/ofono/ofono_1.12.bb | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
Ross Burton - Aug. 1, 2013, 5:04 p.m.
On 1 August 2013 16:01, Jukka Rissanen <jukka.rissanen@linux.intel.com> wrote:
> This allows the ofono.inc file to be used by a recipe that does
> not have or use ofono init script.

I'm not keen on this.  I presume the situation here is that your
distro has an updated ofono that doesn't have an init script, because
your distro is systemd-only.  Can't your overlaid recipe ship a stub
init script (touch files/ofono) to be installed that will get deleted
by systemd.bbclass?

Ross
Jukka Rissanen - Aug. 2, 2013, 5:30 a.m.
Hi Ross,

On 01.08.2013 20:04, Burton, Ross wrote:
> On 1 August 2013 16:01, Jukka Rissanen <jukka.rissanen@linux.intel.com> wrote:
>> This allows the ofono.inc file to be used by a recipe that does
>> not have or use ofono init script.
>
> I'm not keen on this.  I presume the situation here is that your
> distro has an updated ofono that doesn't have an init script, because
> your distro is systemd-only.  Can't your overlaid recipe ship a stub
> init script (touch files/ofono) to be installed that will get deleted
> by systemd.bbclass?
>
> Ross
>

Sure, that is what I am doing atm. It would have been nice if I could 
delete the useless init script but that is very minor issue. So just 
ignore this patch 4.


Cheers,
Jukka

Patch

diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index 3972e06..5e98be9 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -19,11 +19,6 @@  EXTRA_OECONF += "\
 "
 SYSTEMD_SERVICE_${PN} = "ofono.service"
 
-do_install_append() {
-  install -d ${D}${sysconfdir}/init.d/
-  install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
-}
-
 PACKAGES =+ "${PN}-tests"
 
 RDEPENDS_${PN} += "dbus"
diff --git a/meta/recipes-connectivity/ofono/ofono_1.12.bb b/meta/recipes-connectivity/ofono/ofono_1.12.bb
index ad524a0..8f5c341 100644
--- a/meta/recipes-connectivity/ofono/ofono_1.12.bb
+++ b/meta/recipes-connectivity/ofono/ofono_1.12.bb
@@ -13,3 +13,8 @@  SRC_URI[md5sum] = "aa8924c0e8de3ec7ac5e41fe7df4cb99"
 SRC_URI[sha256sum] = "733b75bfd1b2a1925b6de532989c496b8ae17a746691120ef64cceb00b3ef751"
 
 CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
+
+do_install_append() {
+  install -d ${D}${sysconfdir}/init.d/
+  install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
+}