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

Pierre Neidhardt ambrevar at gmail.com
Mon Feb 10 11:23:52 EST 2014


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.

-- 
Pierre Neidhardt

"Right now I feel that I've got my feet on the ground as far as my head
is concerned."
-- Baseball pitcher Bo Belinsky


More information about the pacman-dev mailing list