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

Re: intended MBF: wrong redirections in maintainer scripts



On Thu, Aug 09, 2018 at 11:03:22PM +0200, Wouter Verhelst wrote:
> On Thu, Aug 09, 2018 at 09:48:22PM +0200, Ralf Treinen wrote:

> > You are absolutely right that our assumption about the authors intention
> > may be wrong, and that they really intended the redirection the way they
> > wrote it. This means that we should be more careful, and ignore cases in
> > which the above pattern occurs in a context which has itself a redirection.
> > As a consequence, we wouldn't detect a bug in a case like this one:
> > 
> >  (foo 2>&1 1> /dev/null) | /some/processing
> > 
> > This should be enough to eliminate false positives, right?
> 
> Yes, I think so; or more generally, where the stderr output is caught
> futher on. E.g., something like this wouldn't be a bug either:
> 
> ERRORS=$(foo 2>&1 1>/dev/null)
> 
> But again, I do agree that in general, the assumption that the ordering
> of redirections was mistaken is probably the right one.

Indeed, we also have to check for this case, and probably look over
all detected cases to be sure.

Thanks for your constructive remarks. We will propbably do the MBF at the
end of the moth, after return from [VAC].

-Ralf.


Reply to: