[oe] [meta-oe][meta-efl][PATCH 2/3] systemd.bbclass: fix postinst/rdepends generation for recipes with SYSTEMD_SERVICE (without _PN suffix)
Martin Jansa
martin.jansa at gmail.com
Wed May 30 15:49:18 UTC 2012
On Wed, May 30, 2012 at 05:38:14PM +0200, Andreas Müller wrote:
> On Wed, May 30, 2012 at 5:32 PM, Martin Jansa <martin.jansa at gmail.com> wrote:
> > On Wed, May 30, 2012 at 05:26:46PM +0200, Andreas Müller wrote:
> >> On Wed, May 30, 2012 at 5:22 PM, Martin Jansa <martin.jansa at gmail.com> wrote:
> >> > On Wed, May 30, 2012 at 05:14:58PM +0200, Andreas Müller wrote:
> >> >> On Wed, May 30, 2012 at 4:21 PM, Martin Jansa <martin.jansa at gmail.com> wrote:
> >> >> > Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> >> >> > ---
> >> >> > meta-oe/classes/systemd.bbclass | 3 ++-
> >> >> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >> >> >
> >> >> > diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
> >> >> > index db35717..e895021 100644
> >> >> > --- a/meta-oe/classes/systemd.bbclass
> >> >> > +++ b/meta-oe/classes/systemd.bbclass
> >> >> > @@ -201,7 +201,8 @@ python populate_packages_prepend () {
> >> >> > # run all modifications once when creating package
> >> >> > if os.path.exists('${D}'):
> >> >> > for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
> >> >> > - if d.getVar('SYSTEMD_SERVICE' + "_" + pkg_systemd, 1) and d.getVar('SYSTEMD_SERVICE' + "_" + pkg_systemd, 1).strip():
> >> >> > + systemd_services = d.getVar('SYSTEMD_SERVICE' + "_" + pkg_systemd, 1) or d.getVar('SYSTEMD_SERVICE', 1)
> >> >> > + if systemd_services and systemd_services.strip():
> >> >> > systemd_generate_package_scripts(pkg_systemd)
> >> >> > systemd_add_rdepends(pkg_systemd)
> >> >> > systemd_check_services()
> >> >> > --
> >> >> > 1.7.8.6
> >> >> >
> >> >> Two questions:
> >> >>
> >> >> 1. Did you see [1]?
> >> >
> >> > no, did you forgot to attach it? :)
> >> >
> >> >> 2. What is that strip for?
> >> >
> >> > In one .bbappend I had something like
> >> >
> >> > SERVICES = "foo"
> >> > SERVICES_bar = ""
> >> > SYSTEMD_SERVICE += "${SERVICES}"
> >> >
> >> > And space was ending in SYSTEMD_SERVICE causing this to be executed
> >> > without any real service in it (and failing).
> >> >
> >> > I can fix it by using _append but this .strip() looked like better
> >> > solution for other who don't notice extra whitespace.
> >> >
> >> > Cheers,
> >> >
> >> > --
> >> > Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
> >> Yes :)
> >> http://patches.openembedded.org/patch/28841/
> >
> > Ah, sorry, I haven't noticed this, looks good too (I can fix that case
> > with extra whitespace in my .bbappend if needed).
> >
> > both can fix this:
> > http://trac.shr-project.org/trac/ticket/2003
> >
> > :)
> >
> > Cheers,
> >
> I think yours is better for your use case - sorry I still do not yet
> understand it - but don't worry for that. But my concern is that there
> are other places in systemd.bbclass failing for space issue. Did you
> check that?
Not specially for that, I know that I had this issue when introducing
systemd-machine-units and 2 machines were sharing same layer (same
.bbappend with different services)
I thought it was between om-gta02 and om-gta04, but current .bbappend in
meta-smartphone/meta-openmoko has only services for gta02 so maybe I had
this use-case only in progress and then pushed version without this..
Cheers,
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20120530/0c1e0162/attachment-0002.sig>
More information about the Openembedded-devel
mailing list