[pacman-dev] Install files and messages

Dan McGee dpmcgee at gmail.com
Sat Jan 6 13:21:16 EST 2007

I don't know what other peoples thoughts are, but I think the current
install file system and scriptlets...seems like a drop in at some
point that wasn't fully done right. Most packages currently use the
file for one of two purposes that I can see: 1. display informational
messages 2. perform operations that can't be done in the build phase.
The install scriptlets were likely originally meant more for number 2,
but has become more and more about providing number 1.

Here are some relevant bugs and postings:
metadata messages in PKGBUILD <http://bugs.archlinux.org/task/1571>
display all post-install messages at once <http://bugs.archlinux.org/task/6143>
global on-install system

Here are my thoughts on the situation. As every package builder seems
to have their own presentation format for displaying messages (e.g.
echo ">>>...", echo "  **...**"), it would be nice to have a way to
unify it. Most (all?) messages are in one of two places- post_install
or post_upgrade. I propose these messages should be moved out of these
scriptlets, and moved into a variable, likely still located in the
install file as this is packaged up with the package (unlike the
PKGBUILD). These variables could be called install_msg and
upgrade_msg, respectively. The scriptlets would still remain, but any
output would be 'nonessential'.

By changing where the messages stem from, it would make it easier for
bug 6143 to be fixed, and would also make for cleaner output to
pacman.log, now that all messages are being logged there.

Finally, _alpm_runscriptlet seems pretty complicated...I'm wondering
if it couldn't be cleaned up a bit by someone that is better with
forks and popens. There is also some duplicate code.


More information about the pacman-dev mailing list