On Nov 5, 2007 1:18 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 11/4/07, Xavier <shiningxc@gmail.com> wrote:
On Thu, Oct 18, 2007 at 08:41:07AM -0500, Dan McGee wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
I only saw today that the scriptlet logging wasn't always safe, and that removing it actually fixed a bug : http://bugs.archlinux.org/task/7117#comment18667
I thought this was worth mentionning, because if this scriptlet logging was ever reimplemented, it should probably deal with the %s issue.
Yeah, Jeff was working on this - I explicitly asked him to use puts() for scriptlet lines, and NOT printf(). Though, now that I think of it, we should do the same with _alpm_logaction (using fputs())
I already fixed the lack of logging in GIT, although it is just doing what it used to do for now, which is not what I want it to do in the future (log to pacman.log). And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know. -Dan