On Fri, Jun 03, 2011 at 11:02:34PM +0300, Ville Skyttä wrote: > 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 > We discussed this when we came up with the guidelines. IIRC, we finally decided this wasn't workable because we don't prevent people from packaging systemVinit scripts (either in subpackages or in a wholly separate package. I agree with your points about fragility, though. If you can think of a way that handles both I'd be happy to hear it. > 2) Cosmetic: there are unnecessary '|| :'s sprinkled in the scriptlets, > only the final exit status of a script has any effect. > <nod> I think I'll leave these alone as people don't always understand that. > 3) More or less cosmetic: why hardwire absolute paths everywhere? The > vast majority of other scriptlet snippets don't do that. I've replaced /usr/bin with %{_bindir} now. Are there other paths that we could change? Thanks, and sorry for taking so long to see this, -Toshio
Attachment:
pgppxysqiJXhQ.pgp
Description: PGP signature
-- packaging mailing list packaging@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/packaging