| Submitter | Otavio Salvador |
|---|---|
| Date | Dec. 30, 2011, 12:40 p.m. |
| Message ID | <2eaa23a3419bfd9b5aea6c1f059242a38eb03608.1325248824.git.otavio@ossystems.com.br> |
| Download | mbox | patch |
| Permalink | /patch/17861/ |
| State | New, archived |
| Headers | show |
Comments
On Fri, Dec 30, 2011 at 12:40:54PM +0000, Otavio Salvador wrote: > Move systemd service to xserver-nodm-init-systemd to be consistent > with other packages. > > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> > --- > .../xserver-nodm-init/xserver-nodm-init_2.0.bb | 30 +++++++++---------- > 1 files changed, 14 insertions(+), 16 deletions(-) > > diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb > index 496b342..4d4ae4c 100644 > --- a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb > +++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb > @@ -3,7 +3,7 @@ LICENSE = "GPLv2" > LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" > SECTION = "x11" > > -PR = "r11" > +PR = "r12" > > SRC_URI = "file://xserver-nodm \ > file://xserver-nodm.service \ > @@ -13,6 +13,15 @@ S = ${WORKDIR} > > inherit allarch > > +inherit update-rc.d systemd > + > +INITSCRIPT_NAME = "xserver-nodm" > +INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." > +INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." > + > +SYSTEMD_PACKAGES = "${PN}-systemd" > +SYSTEMD_SERVICE_${PN}-systemd = "xserver-nodm.service" > + > do_install() { > install -d ${D}${sysconfdir}/init.d > install xserver-nodm ${D}${sysconfdir}/init.d > @@ -21,20 +30,9 @@ do_install() { > install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/ > } > > -RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" > -FILES_${PN} += "${base_libdir}/systemd/system/" > - > -inherit update-rc.d > +PACKAGES += "${PN}-systemd" > > -INITSCRIPT_NAME = "xserver-nodm" > -INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." > -INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." > - > -pkg_postinst_${PN}_append () { > - if [ -e ${base_bindir}/systemctl ] ; then > - # can't do this offline > - [ "x$D" != "x" ] && exit 1 > +RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" > > - systemctl enable xserver-nodm.service > - fi > -} > +FILES_${PN}-systemd += "${base_libdir}/systemd/system/" > +RDEPENDS_${PN}-systemd = "xserver-common (>= 1.30) xinit" I haven't tried but isn't this ^ overwritting systemd runtime dependency set by systemd.bbclass? += would be probably bette if it's the case. Regards,
On Fri, Dec 30, 2011 at 10:54, Martin Jansa <martin.jansa@gmail.com> wrote: > I haven't tried but isn't this ^ overwritting systemd runtime dependency > set by systemd.bbclass? += would be probably bette if it's the case. > Got catch, indeed. Thanks. Fixed locally.
Patch
diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb index 496b342..4d4ae4c 100644 --- a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb +++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" SECTION = "x11" -PR = "r11" +PR = "r12" SRC_URI = "file://xserver-nodm \ file://xserver-nodm.service \ @@ -13,6 +13,15 @@ S = ${WORKDIR} inherit allarch +inherit update-rc.d systemd + +INITSCRIPT_NAME = "xserver-nodm" +INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." +INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." + +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE_${PN}-systemd = "xserver-nodm.service" + do_install() { install -d ${D}${sysconfdir}/init.d install xserver-nodm ${D}${sysconfdir}/init.d @@ -21,20 +30,9 @@ do_install() { install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/ } -RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" -FILES_${PN} += "${base_libdir}/systemd/system/" - -inherit update-rc.d +PACKAGES += "${PN}-systemd" -INITSCRIPT_NAME = "xserver-nodm" -INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." -INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." - -pkg_postinst_${PN}_append () { - if [ -e ${base_bindir}/systemctl ] ; then - # can't do this offline - [ "x$D" != "x" ] && exit 1 +RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" - systemctl enable xserver-nodm.service - fi -} +FILES_${PN}-systemd += "${base_libdir}/systemd/system/" +RDEPENDS_${PN}-systemd = "xserver-common (>= 1.30) xinit"
Move systemd service to xserver-nodm-init-systemd to be consistent with other packages. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- .../xserver-nodm-init/xserver-nodm-init_2.0.bb | 30 +++++++++---------- 1 files changed, 14 insertions(+), 16 deletions(-)