[systemd-devel] [PATCH v2] build: don't install busname units and target if kdbus support is disabled

Michael Biebl mbiebl at gmail.com
Thu Sep 4 05:55:01 PDT 2014


2014-09-04 14:31 GMT+02:00 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>:
> On Thu, Sep 04, 2014 at 02:14:23PM +0200, Michael Biebl wrote:
>> Hi,
>>
>> 2014-09-04 6:16 GMT+02:00 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>:
>> > On Wed, Sep 03, 2014 at 11:51:58PM +0200, Michael Biebl wrote:
>>
>> >>  define add-wants
>> >> -     [ -z "$$what" ] || ( \
>> >> +     [ -z "$$what" ] || ! echo $$what | grep -q '[^[:space:]]' || ( \
>> > Maybe we could use something simpler like
>> >         [[ $what =~ ^[[:space:]]*$ ]] || ( \
>>
>> I didn't want to use a bash specific feature here, since /bin/sh is
>> not guaranteed to point to bash.
>> So I guess using grep is the safer choice and I'd like to keep that as is.
> What about folding the first case into the grep pattern then?

Since I didn't think this improved readability, I kept this as-is for now.

>
>> >> +if ENABLE_KDBUS
>> >> +dist_systemunit_DATA += \
>> >> +     units/busnames.target
>> >> +endif
>> > This is quite intrusive. Maybe another layer of indirection would help:
>>
>>
>>
>> >> +if ENABLE_KDBUS
>> >>  BUSNAMES_TARGET_WANTS += \
>> >>       org.freedesktop.hostname1.busname
>> >> +endif
>> > And similarly with this one: if the line in add-wants using
>> > $(BUSNAMES_TARGET_WANTS) could be made conditional, it would be
>> > the only place to modify.
>>
>>
>> I used that, since this was already used for
>> org.freedesktop.systemd1.busname, i.e.
>>
>> if ENABLE_KDBUS
>> dist_systemunit_DATA += \
>>         units/org.freedesktop.systemd1.busname
>>
>> BUSNAMES_TARGET_WANTS += \
>>         org.freedesktop.systemd1.busname
>> endif
>>
>>
>> Do you want me to rework everything, including
>> org.freedesktop.systemd1.busname, based on your suggestion?
> Yes, please.

Updated patch attached


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-don-t-install-busname-units-and-target-if-kdbu.patch
Type: text/x-patch
Size: 6164 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140904/d98be72c/attachment.bin>


More information about the systemd-devel mailing list