Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pacman hook file prefix should be higher than 10 #57

Open
vestingz opened this issue Aug 8, 2021 · 3 comments
Open

Pacman hook file prefix should be higher than 10 #57

vestingz opened this issue Aug 8, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@vestingz
Copy link

vestingz commented Aug 8, 2021

Pacman hook for regenerating the graph should possibly run after other PostTransaction hooks, which might for example handle .pacnew files. According to man 5 alpm-hooks the running order is defined by the alphabetical order of the hooks filenames, so 10-pacwall.hook is one of the first hooks to be triggered, while it should actually be the last. Renaming it to something like 99-pacwall.hook might be warranted.

@Kharacternyk
Copy link
Owner

The hook starts a pacwall process and doesn't wait for it to exit. I chose a small number to utilize this asynchronous execution and update the wallpaper ASAP.

I haven't ever thought about hooks that deal with .pacnew files. There is indeed a race condition.

Are there some well-known hooks that interact with .pacnew files? If so, we could choose a number that is just above ones of such hooks.

99-pacwall.hook solves the issue, but it worsens the responsiveness, albeit by a tiny bit.

@vestingz
Copy link
Author

vestingz commented Aug 8, 2021 via email

@Kharacternyk
Copy link
Owner

I propose changing the priority to 11, so that hooks like the one you use can be run before pacwall and adding a note to the README. It works as long as the hook you use executes properly if run before all the other hooks, though.

@Kharacternyk Kharacternyk added the bug Something isn't working label Aug 10, 2021
@Kharacternyk Kharacternyk added enhancement New feature or request good first issue Good for newcomers and removed bug Something isn't working labels Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants