Wow! I don't know what this code means (I'm not started digging
libalpm internals yet).
What I mean is something like this in .install file:
post_install()
{
task_start("Generating initial ramdisk...")
# some code here...
task_end()
}
instead of this old bad way:
post_install()
{
echo "Generating initial ramdisk..."
# some code here...
echo " done"
}
And like this:
post_install()
{
message("Attention! Please change default config file before
restart!", "MTYPE_WARNING")
}
I'm talking about adding some predefined functions to "API" for PKGBUILDers.
2006/5/29, VMiklos
On Mon, May 29, 2006 at 12:16:31AM +0300, ????? ???????
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);
then an 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 PM_TRANS_EVT_SCRIPTLET_DONE
udv / greetings, VMiklos
-- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev