[pacman-dev] Questions about how to show messages (warnings, etc)

Allan McRae allan at archlinux.org
Wed Dec 4 06:15:56 EST 2013


On 03/12/13 01:47, Andrew Gregory wrote:
> On 12/02/13 at 04:22pm, Olivier Brunel wrote:
>> On 12/02/13 16:17, Andrew Gregory wrote:
>>> On 12/02/13 at 04:11pm, Olivier Brunel wrote:
>>>> Hi,
>>>>
>>>> So I'm working on changing the events callback as discussed earlier, and
>>>> I'm running into some little issues (discrepancies really) when it comes
>>>> to showing warnings/errors.
>>>>
>>>> As you know, pacman can show warnings/errors to the user; and when
>>>> colors are used those prefixes will be shown in color. Except, not always.
>>>>
>>>> There seems to be some inconsistency when it comes to this, because when
>>>> a warning/error needs to be shown, pacman can do one of two things:
>>>> - show it right away
>>>> - cache it and show it later, i.e. when the current progress will be done
>>>>
>>>> Now, when shown right away, prefixes are in color, and messages are
>>>> shown on stderr.
>>>> However, when delayed, there will be no colors (because unlike
>>>> pm_vfprintf(), pm_vasprintf() doesn't add colors to the prefixes) *and*
>>>> messages will be shown on stdout.
>>>>
>>>> Unless there's a reason for this I'm not aware of, I think that this
>>>> should probably be fixed, as in have delayed messages use colors & show
>>>> on stderr?
>>>>
>>>> As a side note, the FS#37711 that Andrew mentioned previously was about
>>>> the lack of colors for creation of .pac* files, but it might actually
>>>> have been a manifestation of this bug/discrepancy (i.e. when fixed, or
>>>> if using --noprogressbar, one would have colors on those warnings already).
>>>
>>> Allan already patched the color issue:
>>> https://mailman.archlinux.org/pipermail/pacman-dev/2013-November/018242.html
>>
>> Oh... okay so I'm using git://projects.archlinux.org/pacman.git to base
>> my work, should I use something else?
> 
> That's right.  The patch has only been submitted for review, it hasn't
> been merged yet.
> 

Note that patches I will push next can be found on my "patchqueue" branch:

https://projects.archlinux.org/users/allan/pacman.git/log/?h=patchqueue

A




More information about the pacman-dev mailing list