tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rmdir -p



On Mon, 19 May 2008 12:50:41 -0400 (EDT)
der Mouse <mouse%Rodents.Montreal.QC.CA@localhost> wrote:
> >> [darcy%dilbert.druid.net@localhost:/usr/NetBSD/cvs/pkgsrc/graphics/librsvg]
> >>  $
> >> pkglint WARN: Makefile:38: The use of a leading "-" to suppress errors
> >> is deprecated. 0 errors and 1 warnings found.
> > It is better to express that explicitly via || true.
> 
> A leading - was added to make specifically to express the semantics of
> "ignore errors from this command".  || says "do this, and then, if it
> fails, do that".  That using it with an always-successful command as
> the RHS has the effect of ignoring failures from the LHS is a side
> effect of its primary purpose, via a comparatively little-known aspect
> of its definition - that the exit status of the || construct is the
> exit status of the last-executed command.

I see your point but while that is the actual definition of "||"
certainly "|| true"  is a recognized convention for "run the command
and ignore any errors."

Anyway, I will see what others have to say and if the concensus is that
the pkglint warning is preferred over this change I will back it out.

Perhaps the problem is with pkglint and the warning should be removed.

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/


Home | Main Index | Thread Index | Old Index