Martin Schulze <[EMAIL PROTECTED]> writes:

> So please check your debian/rules files for constructs like the
> following:
> 
>        chmod g+w `find debian/tmp -name foo`
> 
>        find debian/tmp -name foo|xargs chmod g+w
> 
> the correct way to implement this would be
> 
>        find debian/tmp -name foo|xargs -r chmod g+w

I'd say that this is *only* correct if debian/tmp being empty is *not*
an error condition.

You shouldn't make this change in cases where you know that there's
supposed to be something in debian/tmp (or wherever); you'll just mask
the problem.  In that case, the code *should* fail.  This is analogous
to whether or not you should say:

  for(int i = 0; i < foo; i++) { bar(); }

or 

  for(int i = 0; i != foo; i++) { bar(); }

Technically (though I know no one ever does it) the latter is
preferable.  In general you want the weakest test rather than the
strongest so that failures happen sooner rather than later --
i.e. once they've been compounded.

MHO

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

Reply via email to