[oe] [meta-oe][v2] 05/22] automatically install all *.service and *.socket supplied in recipe's SRC_URI
Martin Jansa
martin.jansa at gmail.com
Fri Feb 17 09:34:59 UTC 2012
On Thu, Feb 16, 2012 at 03:02:59AM +0100, Andreas Müller wrote:
> Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
> Acked-by: Otavio Salvador <otavio at ossystems.com.br>
After reading today's gentoo systemd news:
We have decided to move our systemd installation into /usr prefix.
After the upgrade, the main systemd executable will be installed
as /usr/bin/systemd and the unit files will be installed
to /usr/lib/systemd; however, systemd will still look for unit files
in the /lib location.
I think we should abstract
${base_libdir}/systemd
to some variable inside systemd.bbclass, so if we ever decide to move it
to /usr/lib too, then not only automatically installed *.service files
from SRC_URI are installalled to right directory.
Cheers,
> ---
> meta-oe/classes/systemd.bbclass | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
> index 0ea03ee..b2cf775 100644
> --- a/meta-oe/classes/systemd.bbclass
> +++ b/meta-oe/classes/systemd.bbclass
> @@ -78,6 +78,17 @@ python __anonymous() {
> systemd_after_parse(d)
> }
>
> +# automatically install all *.service and *.socket supplied in recipe's SRC_URI
> +do_install_append() {
> + install -d ${D}${base_libdir}/systemd/system
> + for service in `find ${WORKDIR} -maxdepth 1 -name '*.service' -o -name '*.socket'` ; do
> + # ensure installing systemd-files only (e.g not avahi *.service)
> + if grep -q '\[Unit\]' $service ; then
> + install -m 644 $service ${D}${base_libdir}/systemd/system
> + fi
> + done
> +}
> +
> python populate_packages_prepend () {
> def systemd_generate_package_scripts(pkg):
> bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
> --
> 1.7.4.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
--
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/20120217/f2f697f5/attachment-0002.sig>
More information about the Openembedded-devel
mailing list