Le vendredi 26 août 2011 à 09:40 +0200, Ludwig Nussel a écrit :
Frederic Crozat wrote:
And here is a change, for handling sysvinit to systemd migration, without relying on triggers : [...] And usage is like this : %pre %service_migrate_to_systemd_pre foobar
%post %service_migrate_to_systemd_post foobar %service_add foobar.service
%preun %service_del_preun foobar.service
%postun %service_migrate_to_systemd_postun foobar %service_del_postun foobar.service
Comments welcome (you can use package home:fcrozat:systemd:systemd which contains the changes).
What about integrating %service_migrate_to_systemd_post into %service_add and just do it automatically? Same for %service_migrate_to_systemd_postun. %service_migrate_to_systemd_pre could be renamed to a more generic %service_add_pre then which would allow us to hook in other things in the future if needed.
Initially, the proposal was based on Fedora work, which was using
triggers (and we know it is not a very good idea).
However, if we "merge" the migration macros in the %service_add*, we
won't be able share this macro definition with upstream (which was the
goal initially), since distributions aren't handling migration the
same..
But apart from that, I don't have a strong objection against merging.
--
Frederic Crozat