[kteam-tools][PATCH v2 5/7] git-build-kernel: squelch output noise when there is no debian/debian.env

Kamal Mostafa kamal at canonical.com
Mon Aug 6 16:52:19 UTC 2018


On Mon, Aug 06, 2018 at 04:33:47PM +0100, Andy Whitcroft wrote:
> On Thu, Aug 02, 2018 at 03:40:33PM -0700, Kamal Mostafa wrote:
> > Signed-off-by: Kamal Mostafa <kamal at canonical.com>
> > ---
> >  git-build-kernel/git-build-kernel | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
> > index a683ad4..3c19587 100755
> > --- a/git-build-kernel/git-build-kernel
> > +++ b/git-build-kernel/git-build-kernel
> > @@ -68,7 +68,7 @@ GITSHASHORT="`git log -1 --pretty=%h ${GITBRANCH%%refs/heads/} --`"
> >  }
> >  
> >  ### Get the var "DEBIAN=debian.master" from debian/debian.env
> > -eval `git show $GITBRANCH:debian/debian.env | grep DEBIAN=`
> > +eval `git show $GITBRANCH:debian/debian.env 2>&- | grep DEBIAN=`
> 
> I am not used to seeing stderr being closed.  That could lead to
> applications failing when they attempt to report an error.  Which in the
> general case might lead to unexpected behaviour.  I am wondering why
> this is not 2>/dev/null which feels like a more normal approach.

I'll change it to 2>/dev/null before committing.

 -Kamal

P.S. I close stderr all the time and have never observed any app having
a problem with that.  If any did, I'd call that a bug in that app.





More information about the kernel-team mailing list