Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72858 - [shared-mime-info] Add prefix to pacman hook so it runs earlier

Attached to Project: Arch Linux
Opened by Antonio Rojas (arojas) - Sunday, 28 November 2021, 09:41 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 28 November 2021, 12:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
See [1] for details. In short: pacman runs hooks in alphabetic order. Since the shared-mime-info hook is called 'update-mime-database.hook', it is always one of the last ones to run. In a fresh install that doesn't have shared-mime-info yet, if the package is installed in a big transaction that includes other packages which also run hooks, and one of those hooks happens to rely on the presence of the mime info database, the hook will fail to run since the database hasn't been generated yet.

Please add a (low) numeric prefix to the hook, so other hooks that depend on the presence of the mime database can be sorted to run after the database generation

[1] https://bbs.archlinux.org/viewtopic.php?pid=2005788
This task depends upon

Closed by  Antonio Rojas (arojas)
Sunday, 28 November 2021, 12:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  Thanks
Comment by Andreas Radke (AndyRTR) - Sunday, 28 November 2021, 10:33 GMT
Looking at /usr/share/libalpm/hooks it should be sufficent to rename the hook to something like

install -Dm644 "$srcdir"/update-mime-database.hook "$pkgdir"/usr/share/libalpm/hooks/100-update-mime-database.hook ?

Or is there any reason to run it even earlier in the chain?
Comment by Antonio Rojas (arojas) - Sunday, 28 November 2021, 11:08 GMT
I'm only aware of the appstream hook needing this, something like 20- or 30- should be enough (the standard seems to be to use two digits)
Comment by Andreas Radke (AndyRTR) - Sunday, 28 November 2021, 11:57 GMT
Please confirm new version from testing repo working: shared-mime-info-2.0+115+gd74a913-1.

Loading...