Ludwig Nussel wrote:
Stanislav Brabec schrieb:
Presets added later than services (from util-linux.spec, works only if the preset is part of the package):
%pre %service_add_pre {service}.service if [ $1 -gt 1 ] ; then if ! test -f /usr/lib/systemd/system-preset/{service preset file} ; then echo -n "" >/run/rpm-%{name}-update-{service}.socket-new-in-upgrade fi fi
That is no longer necessary. %service_add_pre does that itself since January.
Are you sure that it helps in situation, where service was introduced in past, and now we are introducing its preset? I guess that in such case it is initialized to a state defined by the presets in time of migration, i. e. most probably value defined in 99-default-disable.preset. My test with 13.2 failed to auto-migrate uuidd. The migration process does not discriminate between implicit default-off preset and the explicit preset in 90-default-openSUSE.preset. For %service_add_pre, the migration was already done in past, and no change is needed. And because the migration was done in time, where presets were set incorrectly, it remains broken. I even don't see a reasonable fully automatic solution. The process cannot discriminate between "no preset is present because maintainer forgot to define it" and "no preset is present because the implicit default off is OK". So I think that any later preset and systemd-presets-branding-* change need a special handling in scripts like the code above. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +49 911 7405384547 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.cz/ PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org