[pacman-dev] Install files and messages
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 <http://bbs.archlinux.org/viewtopic.php?p=219152#219152> 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. -Dan
On Sat, Jan 06, 2007 at 01:21:16PM -0500, Dan McGee wrote:
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 nonessential, I hope you don't mean thrown out altogether. Some install script output is conditional, because it isn't relevant to everyone that installs the package. I don't see why we should complicate things by adding yet another variable to do what some echo lines used to do either. That said, perhaps some sort of function to standardize the output could be used... I'm thining something along the lines of printhl() from /etc/rc.d/functions .
either printhl, or some new function that could be added to /etc/rc.d/functions, such as a message function. good idea I think. the message function could buffer all output and display it at the end of a pacman -Syu. On 1/6/07, Simo Leone <simo@archlinux.org> wrote:
On Sat, Jan 06, 2007 at 01:21:16PM -0500, Dan McGee wrote:
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 nonessential, I hope you don't mean thrown out altogether. Some install script output is conditional, because it isn't relevant to everyone that installs the package. I don't see why we should complicate things by adding yet another variable to do what some echo lines used to do either. That said, perhaps some sort of function to standardize the output could be used... I'm thining something along the lines of printhl() from /etc/rc.d/functions .
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
On 1/6/07, Simo Leone <simo@archlinux.org> wrote:
By nonessential, I hope you don't mean thrown out altogether. Some install script output is conditional, because it isn't relevant to everyone that installs the package.
Without thinking too much about it, I guess it might be helpful to have some sort of standard echo replacement function, that could still be called conditionally. The way the scripts are now, however, makes for rather complicated separation of message output and actual activity such as running gconftool, etc. All output could be redirected to a non-stdout buffer, I guess, and then printed after pacman has finished its messages... -Dan
ooh, good idea On 1/7/07, Dan McGee <dpmcgee@gmail.com> wrote:
On 1/6/07, Simo Leone <simo@archlinux.org> wrote:
By nonessential, I hope you don't mean thrown out altogether. Some install script output is conditional, because it isn't relevant to everyone that installs the package.
Without thinking too much about it, I guess it might be helpful to have some sort of standard echo replacement function, that could still be called conditionally. The way the scripts are now, however, makes for rather complicated separation of message output and actual activity such as running gconftool, etc. All output could be redirected to a non-stdout buffer, I guess, and then printed after pacman has finished its messages...
-Dan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
2007/1/8, Dan McGee <dpmcgee@gmail.com>:
On 1/6/07, Simo Leone <simo@archlinux.org> wrote:
By nonessential, I hope you don't mean thrown out altogether. Some install script output is conditional, because it isn't relevant to everyone that installs the package.
Without thinking too much about it, I guess it might be helpful to have some sort of standard echo replacement function, that could still be called conditionally. The way the scripts are now, however, makes for rather complicated separation of message output and actual activity such as running gconftool, etc. All output could be redirected to a non-stdout buffer, I guess, and then printed after pacman has finished its messages...
See "[pacman-dev] add message() function call for use in *.install/.PKGINFO files" thread (2006-05-25 - 2006-07-07) I thought this was merged in paman3 already. It should be just beautyfied a bit. -- Roman Kyrylych (Роман Кирилич)
participants (4)
-
Christ Schlacta
-
Dan McGee
-
Roman Kyrylych
-
Simo Leone