Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 482370

Summary: =sys-apps/lsb-release-1.4 with dash has incorrect output, contains -e
Product: Gentoo Linux Reporter: Maxim Kammerer <mk>
Component: [OLD] Core systemAssignee: Jeroen Roovers (RETIRED) <jer>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Maxim Kammerer 2013-08-24 21:44:19 UTC
# dash /usr/bin/lsb_release -a
-e LSB Version: n/a
-e Distributor ID:      Gentoo
-e Description: NAME=Gentoo
-e Release:     n/a
-e Codename:    n/a

I use "echo ${BASH:+-e}" in scripts, but maybe there is a better solution.

(unrelated to bug #443116)
Comment 1 yegle 2014-09-24 22:19:48 UTC
Confirm.

Also Debian have a much higher version number and the lsb_release command is a python script instead of a shell script. Should we update to that version?

ref: https://packages.debian.org/wheezy/lsb-release
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-27 19:08:02 UTC
The POSIX form you are looking for is:

  printf '%b\n' "$MY_RANDOM_STRING"
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-27 19:19:30 UTC
+*lsb-release-1.4-r2 (27 Sep 2014)
+
+  27 Sep 2014; Michał Górny <mgorny@gentoo.org> +lsb-release-1.4-r2.ebuild:
+  Use POSIX-compliant printf instead of 'echo -e' bashism, bug #482370.