[Fedora-packaging] Systemd scriptlet comments

Ville Skyttä ville.skytta at iki.fi
Fri Jun 3 20:02:34 UTC 2011


Some comments on systemd scriptlets at
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd

1) I don't think the versioned trigger logic will work too well at all
in the (not that rare) cases where the previous distro had sysv scripts
and one does a version bump in the previous distro - the trigger in the
next one will no longer run on distro upgrades because of the
versioning.  Wouldn't it work better to just drop the version from the
trigger altogether, and instead check if the old init script exists?
For example:

%triggerun -- httpd
[ -e %{_initddir}/httpd ] || exit 0
# rest of the migration stuff goes here

2) Cosmetic: there are unnecessary '|| :'s sprinkled in the scriptlets,
only the final exit status of a script has any effect.

3) More or less cosmetic: why hardwire absolute paths everywhere?  The
vast majority of other scriptlet snippets don't do that.


More information about the packaging mailing list