[OE-core] [daisy][PATCH 1/4] tcf-agent: add systemd support
Khem Raj
raj.khem at gmail.com
Fri May 16 04:55:58 UTC 2014
On Thu, May 15, 2014 at 7:05 PM, ChenQi <Qi.Chen at windriver.com> wrote:
> On 05/15/2014 08:24 PM, Otavio Salvador wrote:
>>
>> On Wed, May 14, 2014 at 7:04 PM, Khem Raj <raj.khem at gmail.com> wrote:
>>>
>>> On Wed, May 14, 2014 at 1:30 PM, Otavio Salvador
>>> <otavio at 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, at 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 "
I see. That makes sense.
>
> Best Regards,
> Chen Qi
More information about the Openembedded-core
mailing list