FS#60107 - [packagekit] libpk_backend_alpm ignores custom libalpm hooks

Attached to Project: Community Packages
Opened by Sergey Zolotorev (serzh-z) - Tuesday, 18 September 2018, 14:31 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 14 September 2022, 21:39 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

PackageKit (libpk_backend_alpm) ignores /etc/pacman.d/hooks/*.hook while running from GNOME Software/Updates.

It is a critical bug if you have some hooks which build/copy/patch kernels or update boot loader entries etc.

Additional info:
* Version: 1.1.10-2
* Default /etc/pacman.conf and /etc/PackageKit/alpm.d/pacman.conf


Steps to reproduce:

1. Create simple hook /etc/pacman.d/hooks/test.hook:

```
[Trigger]
Operation = Install
Operation = Upgrade
Type = File
Target = *

[Action]
Description = TEST
When = PostTransaction
Exec = /bin/bash -c 'while read -r f; do printf "$(date) ${f}\n" >> /var/tmp/pacman-hook-test.txt; done'
NeedsTargets
```

2. Run GNOME Software and confirm to update/reboot system.

3. Wait for update finished and check /var/tmp/pacman-hook-test.txt - there is no file.

[4. Run regular `pacman -S ...` and check /var/tmp/pacman-hook-test.txt - now it exists]
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 14 September 2022, 21:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  See comments
Comment by Eli Schwartz (eschwartz) - Thursday, 20 September 2018, 05:06 GMT
  • Field changed: Category (Packages → Upstream Bugs)
The packagekit libalpm backend ignores lots of things...  FS#45709  shows it ignores IgnorePkg too.

I'm assuming this is an upstream "feature parity" bug and packagekit needs to learn how to handle the configuration file and process the settings it passes on to libalpm function calls. Pretty sure this is not merely something wrong with how we package packagekit itself.
Comment by Sergey Zolotorev (serzh-z) - Thursday, 20 September 2018, 08:44 GMT
Eli, does it mean that users should not place custom ALPM hooks to /etc/pacman.d/hooks (when they run ALPM via PackageKit) and must use /usr/share/libalpm/hooks directory instead?
Comment by Adrian Insaurralde (adrianinsaval) - Wednesday, 14 September 2022, 01:15 GMT
I can't reproduce this issue while using KDE's Discover, seems to have been fixed
Comment by Toolybird (Toolybird) - Wednesday, 14 September 2022, 21:39 GMT

Loading...