All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: Otavio Salvador <otavio@ossystems.com.br>, Khem Raj <raj.khem@gmail.com>
Cc: OpenEmbedded Core Mailing List
	<openembedded-core@lists.openembedded.org>
Subject: Re: [daisy][PATCH 1/4] tcf-agent: add systemd support
Date: Fri, 16 May 2014 10:05:45 +0800	[thread overview]
Message-ID: <53757279.3020908@windriver.com> (raw)
In-Reply-To: <CAP9ODKrwxJ85rn5sPqaW7cvu3cu0+NFcgHOL_My3oUWR1dok5A@mail.gmail.com>

On 05/15/2014 08:24 PM, Otavio Salvador wrote:
> On Wed, May 14, 2014 at 7:04 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Wed, May 14, 2014 at 1:30 PM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>>> +       install -d ${D}${systemd_unitdir}/system
>>> +       install -m 0644 ${WORKDIR}/tcf-agent.service ${D}${systemd_unitdir}/system
>>> +       sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tcf-agent.service
>> shouldn't this happened if systemd is enabled in distro
> Agreed. Added Chen Qi in Cc.
>

In systemd.bbclass, there's function to remove things under 
${systemdunitdir} if 'systemd' is not in DISTRO_FEATURES. So I think 
there's no need to add a check here.

Below are the related codes.

python rm_systemd_unitdir (){
     import shutil
     if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
         systemd_unitdir = oe.path.join(d.getVar("D", True), 
d.getVar('systemd_unitdir', True))
         if os.path.exists(systemd_unitdir):
             shutil.rmtree(systemd_unitdir)
         systemd_libdir = os.path.dirname(systemd_unitdir)
         if (os.path.exists(systemd_libdir) and not 
os.listdir(systemd_libdir)):
             os.rmdir(systemd_libdir)
}
do_install[postfuncs] += "rm_systemd_unitdir "

Best Regards,
Chen Qi


  reply	other threads:[~2014-05-16  2:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 20:30 [daisy][PATCH 1/4] tcf-agent: add systemd support Otavio Salvador
2014-05-14 20:30 ` [daisy][PATCH 2/4] cryptodev-linux: move to recipes-kernel to be shared with module and tests Otavio Salvador
2014-05-14 20:30 ` [daisy][PATCH 3/4] cryptodev-linux: create common .inc file to be shared by " Otavio Salvador
2014-05-14 20:30 ` [daisy][PATCH 4/4] cryptodev-tests: recipe for cryptodev test suite based on OpenSSL Otavio Salvador
2014-05-14 22:04 ` [daisy][PATCH 1/4] tcf-agent: add systemd support Khem Raj
2014-05-15 12:24   ` Otavio Salvador
2014-05-16  2:05     ` ChenQi [this message]
2014-05-16  4:55       ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53757279.3020908@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.