Bug#688304: Check for update-binfmts pollutes output because it does not redirect stderr from which

2012-09-21 Thread bugreports

Package: schroot
Version: 1.6.3-1

When entering a schroot the script setup.d/15binfmt is executed. This 
performs a check to see if update-binfmts is present (on line 31). If 
it is not present the output of the which call is displayed on the 
terminal (because it is sent to stderr and that is not redirected to 
/dev/null).


Example:

$ schroot  ls
E: 15binfmt: which: no update-binfmts in 
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)

Desktop  files
E: 15binfmt: which: no update-binfmts in 
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)


This can be easily fixed by changing line 31 of setup.d/15binfmt from

elif ! which update-binfmts  /dev/null ; then

to

elif ! which update-binfmts  /dev/null 21; then

Patch:
--- 15binfmt.old2012-09-21 10:19:37.228058540 +0100
+++ 15binfmt.new2012-09-21 10:21:21.732157718 +0100
@@ -28,7 +28,7 @@
[ $STAGE != setup-stop  ]  \
[ $STAGE != setup-recover ]; then
 exit 0
-elif ! which update-binfmts  /dev/null; then
+elif ! which update-binfmts  /dev/null 21; then
 info Missing update-binfmts; not enabling binfmt support
 exit 0
 fi

System Details (ArchLinux):
Linux myhost 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 
x86_64 GNU/Linux

lrwxrwxrwx 1 root root 12 Aug 29 11:56 /lib/libc.so.6 - libc-2.16.so
/etc/schroot/setup.d/15binfmt is owned by schroot 1.6.3-1


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688304: [buildd-tools-devel] Bug#688304: Check for update-binfmts pollutes output because it does not redirect stderr from which

2012-09-21 Thread Roger Leigh
On Fri, Sep 21, 2012 at 10:28:13AM +0100, bugrepo...@jelmail.com wrote:
 When entering a schroot the script setup.d/15binfmt is executed.
 This performs a check to see if update-binfmts is present (on line
 31). If it is not present the output of the which call is displayed
 on the terminal (because it is sent to stderr and that is not
 redirected to /dev/null).

Thanks, I'll look at getting this fixed very soon.  Thanks for the
patch.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linuxhttp://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-GPG Public Key  F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org