[pacman-dev] add message() function call for use in *.install/.PKGINFO files
vmiklos at frugalware.org
Sun May 28 17:38:39 EDT 2006
On Mon, May 29, 2006 at 12:16:31AM +0300, ????? ??????? <roman.kyrylych at gmail.com> wrote:
> I think all info messages should just be passed to front-end and it is
> front-end's job how and when to show them. So there should be speciall
> function for use in .install files instead of current echo stuff.
> As for indicating some progress for user: when there is some lengthy
> operation in .install it should be prefixed and postfixed with calls
> to special functions so user will see a message from front end like
> "Generating the initial ramdisk... Please wait." and then "Done" (or
> green checkmark in GUI :-D ).
you can do an
EVENT(trans, PM_TRANS_EVT_SCRIPTLET_START, "Generating the initial ramdisk", NULL);
EVENT(trans, PM_TRANS_EVT_SCRIPTLET_DONE, NULL, NULL);
but when do you call them?
a possible solution:
the scriptlet is executed via popen() then you could parse the output:
if it is something like "task... " then you could call
PM_TRANS_EVT_SCRIPTLET_START and when it is "done." then
udv / greetings,
Developer of Frugalware Linux, to make things frugal - http://frugalware.org
More information about the pacman-dev