All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
       [not found] <20120716074256.12AC410334@opal>
@ 2012-07-16 18:25 ` Martin Jansa
  2012-07-17  8:54   ` Andreas Müller
  2012-08-16 14:07   ` [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd Martin Jansa
  0 siblings, 2 replies; 11+ messages in thread
From: Martin Jansa @ 2012-07-16 18:25 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-commits

[-- Attachment #1: Type: text/plain, Size: 4120 bytes --]

On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org wrote:
> Module: meta-openembedded.git
> Branch: master
> Commit: 264e5a44e1111f939b43c11bb9514a0b435918db
> URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
> 
> Author: Andreas Müller <schnitzeltony@googlemail.com>
> Date:   Wed Jul 11 20:46:07 2012 +0200
> 
> systemd.bbclass: add *-systemd packages to RRECOMMENDS

This is a bit unfortunate e.g. when busybox is used in small chroot
image.
busybox pulls busybox-syslog, which now adds busybox-syslog-systemd and
it ends with systemd/dbus/udev/shadow/pam/util-linux/kmod being added to previously small image, see:

http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f

So it could be solved by image specific BAD_RECOMMENDATIONs or something
like that, but by default it doesn't work very well in this use-case.

Cheers,

> 
> ---
> 
>  meta-systemd/classes/systemd.bbclass |   26 ++++++++++++++++++++++----
>  1 files changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
> index 2e585c3..fce314d 100644
> --- a/meta-systemd/classes/systemd.bbclass
> +++ b/meta-systemd/classes/systemd.bbclass
> @@ -180,8 +180,21 @@ python populate_packages_prepend () {
>  					raise bb.build.FuncFailed, "\n\nFor package %s SYSTEMD_SERVICE-entry %s does not exist" % \
>  						(pkg_systemd, service)
>  
> -	# *-systemd packages get RDEPENDS to systemd and their base package
> -	def systemd_add_rdepends(pkg_systemd):
> +	"""     Setup rdepends / rrecommmends as:
> +
> +                -----------------------------
> +                |  pkg_systemd_base: 'foo'  |
> +                -----------------------------
> +                           |    ^
> +                           |    |                 --------------
> +               rrecommends |    | rdepends        | 'systemd'  |
> +                           |    |               ->--------------
> +                           V    |              / rdepends
> +                ------------------------------/
> +                | pkg_systemd: 'foo-systemd' |
> +                ------------------------------
> +	"""
> +	def systemd_add_rdepends_rrecommends(pkg_systemd):
>  		# RDEPENDS_${pkg_systemd} += pkg_systemd_base systemd
>  		rdepends = d.getVar('RDEPENDS_' + pkg_systemd, 1) or ""
>  		rdepends_arr = rdepends.split()
> @@ -195,13 +208,18 @@ python populate_packages_prepend () {
>  		if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
>  			rdepends = '%s %s' % (rdepends, pkg_systemd_base)
>  		d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
> -
> +		# RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
> +		rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
> +		# not rrecommending myself AND avoid double entries
> +		if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
> +			rrecommends = '%s %s' % (rrecommends, pkg_systemd)
> +		d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
>  
>  	# run all modifications once when creating package
>  	if os.path.exists('${D}'):
>  		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
>  			if get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd) != "":
>  				systemd_generate_package_scripts(pkg_systemd)
> -				systemd_add_rdepends(pkg_systemd)
> +				systemd_add_rdepends_rrecommends(pkg_systemd)
>  		systemd_check_services()
>  }
> 
> 
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-16 18:25 ` [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS Martin Jansa
@ 2012-07-17  8:54   ` Andreas Müller
  2012-07-17  9:18     ` Martin Jansa
  2012-08-16 14:07   ` [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd Martin Jansa
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Müller @ 2012-07-17  8:54 UTC (permalink / raw)
  To: openembedded-devel

On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org wrote:
>> Module: meta-openembedded.git
>> Branch: master
>> Commit: 264e5a44e1111f939b43c11bb9514a0b435918db
>> URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
>>
>> Author: Andreas Müller <schnitzeltony@googlemail.com>
>> Date:   Wed Jul 11 20:46:07 2012 +0200
>>
>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
>
> This is a bit unfortunate e.g. when busybox is used in small chroot
> image.
> busybox pulls busybox-syslog, which now adds busybox-syslog-systemd and
> it ends with systemd/dbus/udev/shadow/pam/util-linux/kmod being added to previously small image, see:
>
> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
>
> So it could be solved by image specific BAD_RECOMMENDATIONs or something
> like that, but by default it doesn't work very well in this use-case.
>
> Cheers,
>
I think the image specific BAD_RECOMMENDATION is not that easy to
implement and to handle by user. I am 'dreaming' of of a distro layer
blacklist. So in your case the distro could mask out whole
meta-systemd. Could you live with that?

Andreas



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-17  8:54   ` Andreas Müller
@ 2012-07-17  9:18     ` Martin Jansa
  2012-07-17  9:23       ` Koen Kooi
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2012-07-17  9:18 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]

On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org wrote:
> >> Module: meta-openembedded.git
> >> Branch: master
> >> Commit: 264e5a44e1111f939b43c11bb9514a0b435918db
> >> URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
> >>
> >> Author: Andreas Müller <schnitzeltony@googlemail.com>
> >> Date:   Wed Jul 11 20:46:07 2012 +0200
> >>
> >> systemd.bbclass: add *-systemd packages to RRECOMMENDS
> >
> > This is a bit unfortunate e.g. when busybox is used in small chroot
> > image.
> > busybox pulls busybox-syslog, which now adds busybox-syslog-systemd and
> > it ends with systemd/dbus/udev/shadow/pam/util-linux/kmod being added to previously small image, see:
> >
> > http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
> >
> > So it could be solved by image specific BAD_RECOMMENDATIONs or something
> > like that, but by default it doesn't work very well in this use-case.
> >
> > Cheers,
> >
> I think the image specific BAD_RECOMMENDATION is not that easy to
> implement and to handle by user. I am 'dreaming' of of a distro layer
> blacklist. So in your case the distro could mask out whole
> meta-systemd. Could you live with that?

No, as the same distro is used to create full images with systemd and
this chroot-image is just small initramfs for kernel (where
systemd+friends is really not needed/expected).

Cheers,

> 
> Andreas
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-17  9:18     ` Martin Jansa
@ 2012-07-17  9:23       ` Koen Kooi
  2012-07-18 12:31         ` Martin Jansa
  0 siblings, 1 reply; 11+ messages in thread
From: Koen Kooi @ 2012-07-17  9:23 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-07-12 11:18, Martin Jansa schreef:
> On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
>> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
>>> wrote:
>>>> Module: meta-openembedded.git Branch: master Commit:
>>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
>>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
>>>>
>>>>
>>>> 
Author: Andreas Müller <schnitzeltony@googlemail.com>
>>>> Date:   Wed Jul 11 20:46:07 2012 +0200
>>>> 
>>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
>>> 
>>> This is a bit unfortunate e.g. when busybox is used in small chroot 
>>> image. busybox pulls busybox-syslog, which now adds
>>> busybox-syslog-systemd and it ends with
>>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
>>> previously small image, see:
>>> 
>>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
>>>
>>>
>>> 
So it could be solved by image specific BAD_RECOMMENDATIONs or something
>>> like that, but by default it doesn't work very well in this
>>> use-case.
>>> 
>>> Cheers,
>>> 
>> I think the image specific BAD_RECOMMENDATION is not that easy to 
>> implement and to handle by user. I am 'dreaming' of of a distro layer 
>> blacklist. So in your case the distro could mask out whole 
>> meta-systemd. Could you live with that?
> 
> No, as the same distro is used to create full images with systemd and 
> this chroot-image is just small initramfs for kernel (where 
> systemd+friends is really not needed/expected).

I think the easiest solution is to remove 'inherit systemd' from busybox.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQBS8fMkyGM64RGpERAlJGAKC4n4q1daBZUi9ltRWaY5jW4GKEcQCfeOxE
amLnSb79qfeIuA1HExCF2M0=
=ypGT
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-17  9:23       ` Koen Kooi
@ 2012-07-18 12:31         ` Martin Jansa
  2012-07-18 14:21           ` Andreas Müller
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2012-07-18 12:31 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3228 bytes --]

On Tue, Jul 17, 2012 at 11:23:43AM +0200, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Op 17-07-12 11:18, Martin Jansa schreef:
> > On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
> >> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
> >> wrote:
> >>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
> >>> wrote:
> >>>> Module: meta-openembedded.git Branch: master Commit:
> >>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
> >>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
> >>>>
> >>>>
> >>>> 
> Author: Andreas Müller <schnitzeltony@googlemail.com>
> >>>> Date:   Wed Jul 11 20:46:07 2012 +0200
> >>>> 
> >>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
> >>> 
> >>> This is a bit unfortunate e.g. when busybox is used in small chroot 
> >>> image. busybox pulls busybox-syslog, which now adds
> >>> busybox-syslog-systemd and it ends with
> >>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
> >>> previously small image, see:
> >>> 
> >>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
> >>>
> >>>
> >>> 
> So it could be solved by image specific BAD_RECOMMENDATIONs or something
> >>> like that, but by default it doesn't work very well in this
> >>> use-case.
> >>> 
> >>> Cheers,
> >>> 
> >> I think the image specific BAD_RECOMMENDATION is not that easy to 
> >> implement and to handle by user. I am 'dreaming' of of a distro layer 
> >> blacklist. So in your case the distro could mask out whole 
> >> meta-systemd. Could you live with that?
> > 
> > No, as the same distro is used to create full images with systemd and 
> > this chroot-image is just small initramfs for kernel (where 
> > systemd+friends is really not needed/expected).
> 
> I think the easiest solution is to remove 'inherit systemd' from busybox.

I have similar problem with gpsd/fso-gpsd and gpsd-systemd too.. On some
devices I would like to include gpsd-systemd in image (e.g. with
systemd-machine-units or through some machine specific task), but on
others (e.g. om-gta02) I need only fso-gpsd.service to provide gpsd
(gpsd-systemd locks gpsd port).

So maybe I didn't understand Andreas right.. I can put all *-systemd
packages to BAD_RECOMMENDATIONs and then include only needed in 
tasks/images like I did before..

Cheers,

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> 
> iD8DBQFQBS8fMkyGM64RGpERAlJGAKC4n4q1daBZUi9ltRWaY5jW4GKEcQCfeOxE
> amLnSb79qfeIuA1HExCF2M0=
> =ypGT
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-18 12:31         ` Martin Jansa
@ 2012-07-18 14:21           ` Andreas Müller
  2012-07-18 14:28             ` Martin Jansa
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Müller @ 2012-07-18 14:21 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Jul 18, 2012 at 2:31 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Tue, Jul 17, 2012 at 11:23:43AM +0200, Koen Kooi wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Op 17-07-12 11:18, Martin Jansa schreef:
>> > On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
>> >> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
>> >> wrote:
>> >>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
>> >>> wrote:
>> >>>> Module: meta-openembedded.git Branch: master Commit:
>> >>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
>> >>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
>> >>>>
>> >>>>
>> >>>>
>> Author: Andreas Müller <schnitzeltony@googlemail.com>
>> >>>> Date:   Wed Jul 11 20:46:07 2012 +0200
>> >>>>
>> >>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
>> >>>
>> >>> This is a bit unfortunate e.g. when busybox is used in small chroot
>> >>> image. busybox pulls busybox-syslog, which now adds
>> >>> busybox-syslog-systemd and it ends with
>> >>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
>> >>> previously small image, see:
>> >>>
>> >>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
>> >>>
>> >>>
>> >>>
>> So it could be solved by image specific BAD_RECOMMENDATIONs or something
>> >>> like that, but by default it doesn't work very well in this
>> >>> use-case.
>> >>>
>> >>> Cheers,
>> >>>
>> >> I think the image specific BAD_RECOMMENDATION is not that easy to
>> >> implement and to handle by user. I am 'dreaming' of of a distro layer
>> >> blacklist. So in your case the distro could mask out whole
>> >> meta-systemd. Could you live with that?
>> >
>> > No, as the same distro is used to create full images with systemd and
>> > this chroot-image is just small initramfs for kernel (where
>> > systemd+friends is really not needed/expected).
>>
>> I think the easiest solution is to remove 'inherit systemd' from busybox.
>
> I have similar problem with gpsd/fso-gpsd and gpsd-systemd too.. On some
> devices I would like to include gpsd-systemd in image (e.g. with
> systemd-machine-units or through some machine specific task), but on
> others (e.g. om-gta02) I need only fso-gpsd.service to provide gpsd
> (gpsd-systemd locks gpsd port).
>
> So maybe I didn't understand Andreas right.. I can put all *-systemd
> packages to BAD_RECOMMENDATIONs and then include only needed in
> tasks/images like I did before..
>
Martin,

Correct me if I go wrong but I think you are mixing up two issues:

issue 1. busybox: automatic redepending drags in things you don't want.
issue 2. gpsd: If I understand you right: there are two services
shipped and auto-enabled and that is leading to a conflict.

My suggestions:
issue 1. Similar as Koen suggested but I would add an additional
variable - something like SYSTEMD_NO_RRECOMMENDS_{PN}. If this is set
to "1", the automatic rrecommends are not appended.
issue 2. The conflict could be resolved by SYSTEMD_AUTO_ENABLE = "disable".

Andreas



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-18 14:21           ` Andreas Müller
@ 2012-07-18 14:28             ` Martin Jansa
  2012-07-18 14:35               ` Andreas Müller
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2012-07-18 14:28 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 5488 bytes --]

On Wed, Jul 18, 2012 at 04:21:19PM +0200, Andreas Müller wrote:
> On Wed, Jul 18, 2012 at 2:31 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Tue, Jul 17, 2012 at 11:23:43AM +0200, Koen Kooi wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Op 17-07-12 11:18, Martin Jansa schreef:
> >> > On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
> >> >> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
> >> >> wrote:
> >> >>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
> >> >>> wrote:
> >> >>>> Module: meta-openembedded.git Branch: master Commit:
> >> >>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
> >> >>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
> >> >>>>
> >> >>>>
> >> >>>>
> >> Author: Andreas Müller <schnitzeltony@googlemail.com>
> >> >>>> Date:   Wed Jul 11 20:46:07 2012 +0200
> >> >>>>
> >> >>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
> >> >>>
> >> >>> This is a bit unfortunate e.g. when busybox is used in small chroot
> >> >>> image. busybox pulls busybox-syslog, which now adds
> >> >>> busybox-syslog-systemd and it ends with
> >> >>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
> >> >>> previously small image, see:
> >> >>>
> >> >>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
> >> >>>
> >> >>>
> >> >>>
> >> So it could be solved by image specific BAD_RECOMMENDATIONs or something
> >> >>> like that, but by default it doesn't work very well in this
> >> >>> use-case.
> >> >>>
> >> >>> Cheers,
> >> >>>
> >> >> I think the image specific BAD_RECOMMENDATION is not that easy to
> >> >> implement and to handle by user. I am 'dreaming' of of a distro layer
> >> >> blacklist. So in your case the distro could mask out whole
> >> >> meta-systemd. Could you live with that?
> >> >
> >> > No, as the same distro is used to create full images with systemd and
> >> > this chroot-image is just small initramfs for kernel (where
> >> > systemd+friends is really not needed/expected).
> >>
> >> I think the easiest solution is to remove 'inherit systemd' from busybox.
> >
> > I have similar problem with gpsd/fso-gpsd and gpsd-systemd too.. On some
> > devices I would like to include gpsd-systemd in image (e.g. with
> > systemd-machine-units or through some machine specific task), but on
> > others (e.g. om-gta02) I need only fso-gpsd.service to provide gpsd
> > (gpsd-systemd locks gpsd port).
> >
> > So maybe I didn't understand Andreas right.. I can put all *-systemd
> > packages to BAD_RECOMMENDATIONs and then include only needed in
> > tasks/images like I did before..
> >
> Martin,
> 
> Correct me if I go wrong but I think you are mixing up two issues:

yes but slightly related, see bellow
> 
> issue 1. busybox: automatic redepending drags in things you don't want.
> issue 2. gpsd: If I understand you right: there are two services
> shipped and auto-enabled and that is leading to a conflict.

Yes, but sofar having gpsd installed was fine, because it didn't pull
gpsd-systemd too (so user was able to start gpsd manually if needed).

Now with PN-systemd pulled by PN I need to be more carefull with images
having both gpsd/fso-gpsd.

> My suggestions:
> issue 1. Similar as Koen suggested but I would add an additional
> variable - something like SYSTEMD_NO_RRECOMMENDS_{PN}. If this is set
> to "1", the automatic rrecommends are not appended.
> issue 2. The conflict could be resolved by SYSTEMD_AUTO_ENABLE = "disable".

I'm trying BAD_RECOMMENDATIONS to resolve this:
http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=679453cdbc2c58b6558c8ede8e6e17826dbb7b3d
http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=fe8a92f123ef3137a9e08e6419315f97f4a663fb
http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=1afdd57475bd3ce586e622bfe6baeb3906bedc2f
http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=af74fe87eeb606b167697453d515a269e2280eb6

but it needs more testing (other builds still running) and for some
reason opkg refuses to remove gpsd-systemd:

SHRZ root@zjama ~ $ opkg remove gpsd-systemd
No packages removed.
Collected errors:
 * print_dependents_warning: Package gpsd-systemd is depended upon by packages:
 * print_dependents_warning:    task-shr-systemd
 * print_dependents_warning:    gpsd
 * print_dependents_warning: These might cease to work if package gpsd-systemd is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
SHRZ root@zjama ~ $ opkg info gpsd
Package: gpsd
Version: 3.4-r7
Depends: libgps20 (>= 3.4), update-rc.d, gpsd-gpsctl, libgpsd20 (>= 3.4), bluez4 (>= 4.101), libusb-1.0-0 (>= 1.0.8), libc6 (>= 2.16)
Recommends: gpsd-conf, gpsd-systemd

even when it's only in gpsd's Recommends..

will check buildhistory after image build if it works there..

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-18 14:28             ` Martin Jansa
@ 2012-07-18 14:35               ` Andreas Müller
  2012-07-18 14:38                 ` Martin Jansa
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Müller @ 2012-07-18 14:35 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Jul 18, 2012 at 4:28 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Wed, Jul 18, 2012 at 04:21:19PM +0200, Andreas Müller wrote:
>> On Wed, Jul 18, 2012 at 2:31 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > On Tue, Jul 17, 2012 at 11:23:43AM +0200, Koen Kooi wrote:
>> >> -----BEGIN PGP SIGNED MESSAGE-----
>> >> Hash: SHA1
>> >>
>> >> Op 17-07-12 11:18, Martin Jansa schreef:
>> >> > On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
>> >> >> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
>> >> >> wrote:
>> >> >>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
>> >> >>> wrote:
>> >> >>>> Module: meta-openembedded.git Branch: master Commit:
>> >> >>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
>> >> >>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> Author: Andreas Müller <schnitzeltony@googlemail.com>
>> >> >>>> Date:   Wed Jul 11 20:46:07 2012 +0200
>> >> >>>>
>> >> >>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
>> >> >>>
>> >> >>> This is a bit unfortunate e.g. when busybox is used in small chroot
>> >> >>> image. busybox pulls busybox-syslog, which now adds
>> >> >>> busybox-syslog-systemd and it ends with
>> >> >>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
>> >> >>> previously small image, see:
>> >> >>>
>> >> >>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
>> >> >>>
>> >> >>>
>> >> >>>
>> >> So it could be solved by image specific BAD_RECOMMENDATIONs or something
>> >> >>> like that, but by default it doesn't work very well in this
>> >> >>> use-case.
>> >> >>>
>> >> >>> Cheers,
>> >> >>>
>> >> >> I think the image specific BAD_RECOMMENDATION is not that easy to
>> >> >> implement and to handle by user. I am 'dreaming' of of a distro layer
>> >> >> blacklist. So in your case the distro could mask out whole
>> >> >> meta-systemd. Could you live with that?
>> >> >
>> >> > No, as the same distro is used to create full images with systemd and
>> >> > this chroot-image is just small initramfs for kernel (where
>> >> > systemd+friends is really not needed/expected).
>> >>
>> >> I think the easiest solution is to remove 'inherit systemd' from busybox.
>> >
>> > I have similar problem with gpsd/fso-gpsd and gpsd-systemd too.. On some
>> > devices I would like to include gpsd-systemd in image (e.g. with
>> > systemd-machine-units or through some machine specific task), but on
>> > others (e.g. om-gta02) I need only fso-gpsd.service to provide gpsd
>> > (gpsd-systemd locks gpsd port).
>> >
>> > So maybe I didn't understand Andreas right.. I can put all *-systemd
>> > packages to BAD_RECOMMENDATIONs and then include only needed in
>> > tasks/images like I did before..
>> >
>> Martin,
>>
>> Correct me if I go wrong but I think you are mixing up two issues:
>
> yes but slightly related, see bellow
>>
>> issue 1. busybox: automatic redepending drags in things you don't want.
>> issue 2. gpsd: If I understand you right: there are two services
>> shipped and auto-enabled and that is leading to a conflict.
>
> Yes, but sofar having gpsd installed was fine, because it didn't pull
> gpsd-systemd too (so user was able to start gpsd manually if needed).
>
> Now with PN-systemd pulled by PN I need to be more carefull with images
> having both gpsd/fso-gpsd.
>
>> My suggestions:
>> issue 1. Similar as Koen suggested but I would add an additional
>> variable - something like SYSTEMD_NO_RRECOMMENDS_{PN}. If this is set
>> to "1", the automatic rrecommends are not appended.
>> issue 2. The conflict could be resolved by SYSTEMD_AUTO_ENABLE = "disable".
>
> I'm trying BAD_RECOMMENDATIONS to resolve this:
> http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=679453cdbc2c58b6558c8ede8e6e17826dbb7b3d
> http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=fe8a92f123ef3137a9e08e6419315f97f4a663fb
> http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=1afdd57475bd3ce586e622bfe6baeb3906bedc2f
> http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=af74fe87eeb606b167697453d515a269e2280eb6
>
> but it needs more testing (other builds still running) and for some
> reason opkg refuses to remove gpsd-systemd:
>
> SHRZ root@zjama ~ $ opkg remove gpsd-systemd
> No packages removed.
> Collected errors:
>  * print_dependents_warning: Package gpsd-systemd is depended upon by packages:
>  * print_dependents_warning:    task-shr-systemd
>  * print_dependents_warning:    gpsd
>  * print_dependents_warning: These might cease to work if package gpsd-systemd is removed.
>
>  * print_dependents_warning: Force removal of this package with --force-depends.
>  * print_dependents_warning: Force removal of this package and its dependents
>  * print_dependents_warning: with --force-removal-of-dependent-packages.
> SHRZ root@zjama ~ $ opkg info gpsd
> Package: gpsd
> Version: 3.4-r7
> Depends: libgps20 (>= 3.4), update-rc.d, gpsd-gpsctl, libgpsd20 (>= 3.4), bluez4 (>= 4.101), libusb-1.0-0 (>= 1.0.8), libc6 (>= 2.16)
> Recommends: gpsd-conf, gpsd-systemd
>
> even when it's only in gpsd's Recommends..
>
> will check buildhistory after image build if it works there..
>
As far as I remember, opkg treats rrecommends same as rdepends.

To remove there is some force-dependency param in opkg.

Andreas



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS
  2012-07-18 14:35               ` Andreas Müller
@ 2012-07-18 14:38                 ` Martin Jansa
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Jansa @ 2012-07-18 14:38 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 6210 bytes --]

On Wed, Jul 18, 2012 at 04:35:44PM +0200, Andreas Müller wrote:
> On Wed, Jul 18, 2012 at 4:28 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Wed, Jul 18, 2012 at 04:21:19PM +0200, Andreas Müller wrote:
> >> On Wed, Jul 18, 2012 at 2:31 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> >> > On Tue, Jul 17, 2012 at 11:23:43AM +0200, Koen Kooi wrote:
> >> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> >> Hash: SHA1
> >> >>
> >> >> Op 17-07-12 11:18, Martin Jansa schreef:
> >> >> > On Tue, Jul 17, 2012 at 10:54:41AM +0200, Andreas Müller wrote:
> >> >> >> On Mon, Jul 16, 2012 at 8:25 PM, Martin Jansa <martin.jansa@gmail.com>
> >> >> >> wrote:
> >> >> >>> On Mon, Jul 16, 2012 at 07:42:56AM +0000, git@git.openembedded.org
> >> >> >>> wrote:
> >> >> >>>> Module: meta-openembedded.git Branch: master Commit:
> >> >> >>>> 264e5a44e1111f939b43c11bb9514a0b435918db URL:
> >> >> >>>> http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=264e5a44e1111f939b43c11bb9514a0b435918db
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> Author: Andreas Müller <schnitzeltony@googlemail.com>
> >> >> >>>> Date:   Wed Jul 11 20:46:07 2012 +0200
> >> >> >>>>
> >> >> >>>> systemd.bbclass: add *-systemd packages to RRECOMMENDS
> >> >> >>>
> >> >> >>> This is a bit unfortunate e.g. when busybox is used in small chroot
> >> >> >>> image. busybox pulls busybox-syslog, which now adds
> >> >> >>> busybox-syslog-systemd and it ends with
> >> >> >>> systemd/dbus/udev/shadow/pam/util-linux/kmod being added to
> >> >> >>> previously small image, see:
> >> >> >>>
> >> >> >>> http://git.shr-project.org/git/?p=buildhistory.git;a=blobdiff;f=images/crespo/eglibc/chroot-image/installed-package-names.txt;h=07187b9e51bd0199910152a8019d117ed41cc2db;hp=8f401e657dd449e30fe8183dc86a791d09614d9f;hb=ac04304bb15221b49e5af6838068f158e7d628ed;hpb=4c0555e7fa689c3c20902c7fc1ec8e525769723f
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> So it could be solved by image specific BAD_RECOMMENDATIONs or something
> >> >> >>> like that, but by default it doesn't work very well in this
> >> >> >>> use-case.
> >> >> >>>
> >> >> >>> Cheers,
> >> >> >>>
> >> >> >> I think the image specific BAD_RECOMMENDATION is not that easy to
> >> >> >> implement and to handle by user. I am 'dreaming' of of a distro layer
> >> >> >> blacklist. So in your case the distro could mask out whole
> >> >> >> meta-systemd. Could you live with that?
> >> >> >
> >> >> > No, as the same distro is used to create full images with systemd and
> >> >> > this chroot-image is just small initramfs for kernel (where
> >> >> > systemd+friends is really not needed/expected).
> >> >>
> >> >> I think the easiest solution is to remove 'inherit systemd' from busybox.
> >> >
> >> > I have similar problem with gpsd/fso-gpsd and gpsd-systemd too.. On some
> >> > devices I would like to include gpsd-systemd in image (e.g. with
> >> > systemd-machine-units or through some machine specific task), but on
> >> > others (e.g. om-gta02) I need only fso-gpsd.service to provide gpsd
> >> > (gpsd-systemd locks gpsd port).
> >> >
> >> > So maybe I didn't understand Andreas right.. I can put all *-systemd
> >> > packages to BAD_RECOMMENDATIONs and then include only needed in
> >> > tasks/images like I did before..
> >> >
> >> Martin,
> >>
> >> Correct me if I go wrong but I think you are mixing up two issues:
> >
> > yes but slightly related, see bellow
> >>
> >> issue 1. busybox: automatic redepending drags in things you don't want.
> >> issue 2. gpsd: If I understand you right: there are two services
> >> shipped and auto-enabled and that is leading to a conflict.
> >
> > Yes, but sofar having gpsd installed was fine, because it didn't pull
> > gpsd-systemd too (so user was able to start gpsd manually if needed).
> >
> > Now with PN-systemd pulled by PN I need to be more carefull with images
> > having both gpsd/fso-gpsd.
> >
> >> My suggestions:
> >> issue 1. Similar as Koen suggested but I would add an additional
> >> variable - something like SYSTEMD_NO_RRECOMMENDS_{PN}. If this is set
> >> to "1", the automatic rrecommends are not appended.
> >> issue 2. The conflict could be resolved by SYSTEMD_AUTO_ENABLE = "disable".
> >
> > I'm trying BAD_RECOMMENDATIONS to resolve this:
> > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=679453cdbc2c58b6558c8ede8e6e17826dbb7b3d
> > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=fe8a92f123ef3137a9e08e6419315f97f4a663fb
> > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=1afdd57475bd3ce586e622bfe6baeb3906bedc2f
> > http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=af74fe87eeb606b167697453d515a269e2280eb6
> >
> > but it needs more testing (other builds still running) and for some
> > reason opkg refuses to remove gpsd-systemd:
> >
> > SHRZ root@zjama ~ $ opkg remove gpsd-systemd
> > No packages removed.
> > Collected errors:
> >  * print_dependents_warning: Package gpsd-systemd is depended upon by packages:
> >  * print_dependents_warning:    task-shr-systemd
> >  * print_dependents_warning:    gpsd
> >  * print_dependents_warning: These might cease to work if package gpsd-systemd is removed.
> >
> >  * print_dependents_warning: Force removal of this package with --force-depends.
> >  * print_dependents_warning: Force removal of this package and its dependents
> >  * print_dependents_warning: with --force-removal-of-dependent-packages.
> > SHRZ root@zjama ~ $ opkg info gpsd
> > Package: gpsd
> > Version: 3.4-r7
> > Depends: libgps20 (>= 3.4), update-rc.d, gpsd-gpsctl, libgpsd20 (>= 3.4), bluez4 (>= 4.101), libusb-1.0-0 (>= 1.0.8), libc6 (>= 2.16)
> > Recommends: gpsd-conf, gpsd-systemd
> >
> > even when it's only in gpsd's Recommends..
> >
> > will check buildhistory after image build if it works there..
> >
> As far as I remember, opkg treats rrecommends same as rdepends.
> 
> To remove there is some force-dependency param in opkg.

At least with older opkg I was able to remove recommended deps without -force-depends..

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd
  2012-07-16 18:25 ` [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS Martin Jansa
  2012-07-17  8:54   ` Andreas Müller
@ 2012-08-16 14:07   ` Martin Jansa
  2012-08-16 14:53     ` Andreas Müller
  1 sibling, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2012-08-16 14:07 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-systemd/classes/systemd.bbclass |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 4036f91..96d7f8f 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -2,6 +2,8 @@ DEPENDS_append = " systemd-systemctl-native"
 
 SYSTEMD_AUTO_ENABLE ??= "enable"
 
+SYSTEMD_AUTO_RRECOMMENDS ??= "enable"
+
 systemd_postinst() {
 OPTS=""
 
@@ -208,12 +210,14 @@ python populate_packages_prepend () {
         if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
             rdepends = '%s %s' % (rdepends, pkg_systemd_base)
         d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
-        # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
-        rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
-        # not rrecommending myself AND avoid double entries
-        if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
-            rrecommends = '%s %s' % (rrecommends, pkg_systemd)
-        d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
+        auto_rrecommends = d.getVar('SYSTEMD_AUTO_RRECOMMENDS', 1) or 'enable'
+        if auto_rrecommends == 'enable':
+            # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
+            rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
+            # not rrecommending myself AND avoid double entries
+            if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
+                rrecommends = '%s %s' % (rrecommends, pkg_systemd)
+            d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
 
     # run all modifications once when creating package
     if os.path.exists('${D}'):
-- 
1.7.8.6




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd
  2012-08-16 14:07   ` [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd Martin Jansa
@ 2012-08-16 14:53     ` Andreas Müller
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Müller @ 2012-08-16 14:53 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Aug 16, 2012 at 4:07 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta-systemd/classes/systemd.bbclass |   16 ++++++++++------
>  1 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
> index 4036f91..96d7f8f 100644
> --- a/meta-systemd/classes/systemd.bbclass
> +++ b/meta-systemd/classes/systemd.bbclass
> @@ -2,6 +2,8 @@ DEPENDS_append = " systemd-systemctl-native"
>
>  SYSTEMD_AUTO_ENABLE ??= "enable"
>
> +SYSTEMD_AUTO_RRECOMMENDS ??= "enable"
> +
>  systemd_postinst() {
>  OPTS=""
>
> @@ -208,12 +210,14 @@ python populate_packages_prepend () {
>          if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
>              rdepends = '%s %s' % (rdepends, pkg_systemd_base)
>          d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
> -        # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
> -        rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
> -        # not rrecommending myself AND avoid double entries
> -        if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
> -            rrecommends = '%s %s' % (rrecommends, pkg_systemd)
> -        d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
> +        auto_rrecommends = d.getVar('SYSTEMD_AUTO_RRECOMMENDS', 1) or 'enable'
> +        if auto_rrecommends == 'enable':
> +            # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
> +            rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
> +            # not rrecommending myself AND avoid double entries
> +            if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
> +                rrecommends = '%s %s' % (rrecommends, pkg_systemd)
> +            d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
>
>      # run all modifications once when creating package
>      if os.path.exists('${D}'):
> --
> 1.7.8.6
>
>
Although I don't have this use case - I like this one. Off topic: We
should think of documentation for the systemd variables...

Acked-by: Andreas Müller <schnitzeltony@googlemail.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-08-16 15:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20120716074256.12AC410334@opal>
2012-07-16 18:25 ` [oe-commits] Andreas Müller : systemd.bbclass: add *-systemd packages to RRECOMMENDS Martin Jansa
2012-07-17  8:54   ` Andreas Müller
2012-07-17  9:18     ` Martin Jansa
2012-07-17  9:23       ` Koen Kooi
2012-07-18 12:31         ` Martin Jansa
2012-07-18 14:21           ` Andreas Müller
2012-07-18 14:28             ` Martin Jansa
2012-07-18 14:35               ` Andreas Müller
2012-07-18 14:38                 ` Martin Jansa
2012-08-16 14:07   ` [meta-oe][meta-systemd][PATCH] systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd Martin Jansa
2012-08-16 14:53     ` Andreas Müller

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.