You are not logged in.
If I add a
post_install
function in a package.INSTALL, it seems that pacman redirects (somewhere?) all output, and it's not /var/log/pacman.log.
Is there a location where the output is redirected to? Is there a standard way to send messages to the console during installation? A particular command from within the chroot that I should be looking up?
Last edited by chimpanzee (2018-08-14 09:19:29)
Offline
Actually it is logged, both to the console and to pacman.log (as ALPM-SCRIPTLET).
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I looked in /var/log/pacman.log and don't see it --- and I didn't find a console to which the text went. And I tried redirecting to stderr as well.
Is there a command other than echo that I should be using? Or is there a configuration flag to pacman and makepkg that determines whether stdout and stderr get /dev/null'd?
Or an example of a package that is known to send messages to log/screen that I should use to debug my *.INSTALL script?
Offline
So, my mistake.
I believe post_install does not run after an update, so while debugging package construction it's quite easy to lose track of the current installation state, and miss the message.
No need to redirect to stderr.
No need to do anything special.
Offline
If you use the --debug flag to pacman, you will see log messages like:
:: Processing package changes...
[09:19:17] debug: installing packages
reinstalling pulseaudio...
[09:19:17] debug: reinstalling package pulseaudio-12.2-2
[09:19:17] debug: opening archive /var/cache/pacman/pkg/pulseaudio-12.2-2-x86_64.pkg.tar.xz
[09:19:17] debug: extracting: .INSTALL
[09:19:17] debug: removing old package first (pulseaudio-12.2-2)
Note that the first thing it does for each package is extract the .INSTALL
And the last thing it does is execute it (from /tmp/alpm_8KxmJ5/.INSTALL in this case) :
[09:19:17] debug: updating database
[09:19:17] debug: adding database entry 'pulseaudio'
[09:19:17] debug: writing pulseaudio-12.2-2 DESC information back to db
[09:19:17] debug: writing pulseaudio-12.2-2 FILES information back to db
[09:19:17] debug: adding entry 'pulseaudio' in 'local' cache
[09:19:17] debug: executing ". /tmp/alpm_8KxmJ5/.INSTALL; post_upgrade 12.2-2 12.2-2"
[09:19:17] debug: executing "/usr/bin/bash" under chroot "/"
[09:19:17] debug: call to waitpid succeeded
[09:19:17] debug: running ldconfig
[09:19:17] debug: executing "/usr/bin/ldconfig" under chroot "/"
[09:19:17] debug: call to waitpid succeeded
[09:19:17] debug: parsing hook file /etc/pacman.d/hooks/dash-as-bin-sh.hook
[09:19:17] debug: parsing hook file /usr/share/libalpm/hooks/update-ca-trust.hook
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline