[Bug 1504127] Comment bridged from LTC Bugzilla
bugproxy
bugproxy at us.ibm.com
Fri Sep 30 11:09:39 UTC 2016
------- Comment From thierry.fauck at fr.ibm.com 2016-09-30 07:07 EDT-------
On xenial, problem still present
ubuntu at vm76:~$ ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq Ubuntu && echo It-is-
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
It-is-
ubuntu at vm76:~$ dpkg -l bash grep
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================-=================-=================-========================================================
ii bash 4.3-14ubuntu1 ppc64el GNU Bourne Again SHell
ii grep 2.25-1~16.04.1 ppc64el GNU grep, egrep and fgrep
ubuntu at vm76:~$ sh -c 'lsb_release -is | false'
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
and on Yakketi even if grep release is higher, problem exists
$ dpkg -l bash grep
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii bash 4.3-15ubuntu ppc64el GNU Bourne Again SHell
ii grep 2.25-6 ppc64el GNU grep, egrep and fgrep
ubuntu at vm20:~$ sh -c 'lsb_release -is | false'
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lsb in Ubuntu.
https://bugs.launchpad.net/bugs/1504127
Title:
lsb_release throws exception if stdout is closed
Status in lsb package in Ubuntu:
Triaged
Bug description:
== Comment: #0 - Liang Chang Guo <lcguo at us.ibm.com> - 2015-10-06 20:43:30 ==
For testing if a system is Ubuntu, the following combined command with bash always gets extra BrokenPipeError on Ubuntu (14.04 to 15.10):
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq Ubuntu
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
While the return code is correct:
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq Ubuntu && echo It-is-Ubuntu
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
It-is-Ubuntu
It may work well if with slight changes for the command:
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -i Ubuntu
NAME="Ubuntu"
... ...
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq UbuntuW
# ( cat /etc/os-release /proc/version; sleep 1; echo =; lsb_release -is ) | grep -iq Ubuntu
# cat /etc/os-release /proc/version | grep -iq Ubuntu
# (lsb_release -is) | grep -iq Ubuntu
*** Ubuntu Platform Info ***
# uname -a
Linux ubt1510J2 4.2.0-12-generic #14-Ubuntu SMP Mon Sep 28 16:50:34 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
# dpkg -l bash grep
||/ Name Version Architecture Description
+++-=================================-=====================-=====================-=========================
ii bash 4.3-14ubuntu1 ppc64el GNU Bourne Again SHell
ii grep 2.21-2 ppc64el GNU grep, egrep and fgrep
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/1504127/+subscriptions
More information about the foundations-bugs
mailing list