]> code.ossystems Code Review - openembedded-core.git/commitdiff
lsb: distro codename info added
authorCristian Iorga <cristian.iorga@intel.com>
Mon, 1 Apr 2013 07:34:45 +0000 (10:34 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Apr 2013 17:09:30 +0000 (18:09 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/lsb/lsb_4.1.bb

index 01368b334bd4b45f335f8aa0384e2f2543c897a8..59d5bcafefad2fe205e376ba957536d90d9b6ba9 100644 (file)
@@ -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