[pacman-dev] [PATCHv3 5/7] pacsearch: skip any non-matching line instead of printing them

Allan McRae allan at archlinux.org
Mon Feb 10 19:12:04 EST 2014


On 11/02/14 02:23, Pierre Neidhardt wrote:
> On 14-02-10 11:06:51, Andrew Gregory wrote:
>> On 02/09/14 at 07:41pm, Pierre Neidhardt wrote:
>>> If input cannot be parsed, it is not desirable to output it along other valid
>>> entries. This would make pacsearch output unpredictable.
>>>
>>> Signed-off-by: Pierre Neidhardt <ambrevar at gmail.com>
>>> ---
>>>  contrib/pacsearch.in | 7 ++-----
>>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> -1.  pacsearch is a thin pacman wrapper and should not hide output.
>> Since it doesn't do any real argument parsing, a user can pass an
>> option that alters pacman's output (-q for instance) and this would
>> hide all output from the user without giving any indication of an
>> error.
> 
> Then I suggest to print a message to stderr instead, since outputing unparseable
> lines among the regular output can introdcue subtle bugs in programs using
> pacsearch output.
> 

Do you have an example with unparsable output?

A



More information about the pacman-dev mailing list