<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 07/12/2013 09:32 PM, Burton, Ross wrote:<br>
<span style="white-space: pre;">> On 11 July 2013 19:32, Saul
Wold <a class="moz-txt-link-rfc2396E" href="mailto:sgw@linux.intel.com"><sgw@linux.intel.com></a> wrote:<br>
>>> We are seeing different checks for different recipes.
Do you<br>
>>> guys think that it is possible to handle them in
bbclass.<br>
>>> <br>
>> How different are they, there is the DISTRO_FEATURE check
and then <br>
>> typically the service file or the init file is sed'ed and
<br>
>> installed.<br>
> <br>
> My initial thoughts were to keep it simple and have a <br>
> do_install_append() that deleted the sysvinit or systemd
files <br>
> depending on DISTRO_FEATURES, leaving installing the files
themselves<br>
> (from upstream, from a file, whatever) up to the recipe
because<br>
> that's where the complications are.</span><br>
<br>
We can also easily move 'sed' part to systemd class because we will
only be <br>
looking for all the service files in ${systemd_unitdir},
irrespective of <br>
how these got installed.<br>
<br>
I gave a little thought to move the installation part into the class
and there <br>
can be a solution but probably little complicated. The neatest
solution would <br>
be to define an another variable say 'SYSTEMD_SERVICE_FILES_{PN}' <br>
which will hold the name of all the service files, need to be
installed, along <br>
with their relative path from WORKDIR. We can check in systemd class
that if <br>
${systemd_unitdir} is not present, means upstream hasn't installed
anything, <br>
then install whatever is in 'SYSTEMD_SERVICE_FILES_{PN}'.<br>
<br>
Other option is to reuse current 'SYSTEMD_SERVICE_${PN}' that lists
the service <br>
files in the package but doesn't include the path of service files.
If we do not <br>
want a new variable, which seems like a duplication, then we can add
the path <br>
with the service files in this variable and tweak systemd class to
handle this in <br>
current implementation. We will add the path only if service file to
be installed is <br>
not present in WORKDIR but buried somewhere in the package source.<br>
<br>
Please let me know of your thoughts about installation part.<br>
<br>
Best Regards,<br>
Shakeel<br>
<br>
</body>
</html>