Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#72634 - exec hook not working as normally executed

Attached to Project: Pacman
Opened by sir akai (sirakai) - Thursday, 04 November 2021, 17:28 GMT
Last edited by Jonas Witschel (diabonas) - Monday, 15 November 2021, 16:08 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 6.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
hook code:https://pastebin.com/7hWTUF12
dmenu_path code:https://pastebin.com/uKSRxiGz

Steps to Reproduce:
1
copy the files to their path:
/etc/pacman.d/hooks/dmenu_path.hook (default pacman hook's path)
/usr/bin/dmenu_path
2
remove or install a package with pacman

Conclusions:
/usr/bin/dmenu_path hasn't been executed correctly, or at all.

Note that i set exec to '/usr/bin/sh -c /usr/bin/dmenu_path' because '/usr/bin/dmenu_path' itself outputs everything to stout(without updating/creating the dmenu_run cache file), which even dmenu_path itself doesn't do.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Monday, 15 November 2021, 16:08 GMT
Reason for closing:  Not a bug
Additional comments about closing:  pacman hooks are run as root
Comment by sir akai (sirakai) - Thursday, 04 November 2021, 17:38 GMT
edit:
dmenu_path code doesn't work itself in that code, remove 'sh -c"$COMMAND"' and leave $COMMAND in there.
Comment by Andrew Gregory (andrewgregory) - Thursday, 04 November 2021, 18:21 GMT
Everything looks fine to me. What makes you think it's not being executed?
Comment by sir akai (sirakai) - Friday, 05 November 2021, 15:25 GMT
When I run dmenu_run there's no dmenu cache, no entry to select.
Also there's no apparent reason for the hook to stout the dmenu_path command, in shell it doesn't output anything.
Comment by sir akai (sirakai) - Friday, 05 November 2021, 15:27 GMT
/home/$USER/.cache/dmenu_run file isn't created if it doesn't exist(it does if ran from shell).

Comment by Andrew Gregory (andrewgregory) - Friday, 05 November 2021, 15:42 GMT
The hook is run as root, $HOME is /root
Comment by sir akai (sirakai) - Monday, 15 November 2021, 15:58 GMT
problem resolved. Now it works and also doesn't output anything in pacman stout.

Loading...