FS#49653 - [pacman] libalpm hook sorting should ignore suffix

Attached to Project: Pacman
Opened by Jouke Witteveen (jouke) - Friday, 10 June 2016, 16:19 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 11 October 2019, 19:38 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.1.1
Due in Version 5.2.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Hooks are started in alphabetical order. The only way to have an ordering dependency between hooks is by choosing their names so that they are ordered correctly. There is currently no priority field or other way to influence this ordering. Contrary to what is customary in some other projects (xorg), the hooks currently distributed do not start their names with two digits, thus name based ordering is about creative phrasing.

Unfortunately, there are quite a few characters in the ASCII table before the period '.'. This means that if we want to to have a hook that is executed after, for instance, 'update-desktop-database.hook' we cannot name it 'update-desktop-database-post.hook', as the dash '-' is ordered before the period '.'. The attached patch changes the ordering of hooks by ignoring the '.hook' suffix.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Friday, 11 October 2019, 19:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  https://git.archlinux.org/pacman.git/com mit/?id=7f1f1355bbb3941a30798a295721e7f3 5077e116