Patchwork lsb: distro codename info added

login
register
mail settings
Submitter Cristian Iorga
Date April 1, 2013, 7:34 a.m.
Message ID <1364801685-7249-1-git-send-email-cristian.iorga@intel.com>
Download mbox | patch
Permalink /patch/47183/
State Accepted
Commit ddd43fcdb8af7d5b1a64d2c6cbd72a3896869321
Headers show

Comments

Cristian Iorga - April 1, 2013, 7:34 a.m.
Poky distro codename info added to /etc/lsb-release file.
lsb_release script will not complain anymore about
the incompleteness of /etc/lsb-release file by
returning an error code.
Increases LSB compliance.

Partial fix for [YOCTO #4071].

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 meta/recipes-extended/lsb/lsb_4.1.bb |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index 01368b3..59d5bca 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -2,7 +2,7 @@  DESCRIPTION = "LSB support for OpenEmbedded"
 SECTION = "console/utils"
 HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
 LICENSE = "GPLv2+"
-PR = "r1"
+PR = "r2"
 
 # lsb_release needs getopt
 RDEPENDS_${PN} += "util-linux"
@@ -41,6 +41,9 @@  do_install(){
 	echo "\"" >> ${D}${sysconfdir}/lsb-release
 	echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
 	echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
+	if [ -n "${DISTRO_CODENAME}" ]; then
+		echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
+	fi
 	echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
 
 	if [ "${TARGET_ARCH}" = "i586" ];then