<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10591</bug_id>
          
          <creation_ts>2016-11-03 10:34:06 +0000</creation_ts>
          <short_desc>oe.lsb.distro_identifier() doesn&apos;t always return the same value for CentOS 7</short_desc>
          <delta_ts>2016-11-23 21:05:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>abuse</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67888</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-03 10:34:06 +0000</bug_when>
    <thetext>If you have lsb_release available distro identifier is parsed from the output of `lsb_release -ir` and returned as as &quot;CentOS&quot;, however if you don&apos;t have lsb_release installed (certainly common in CentOS Docker containers) we fall back to reading os-release or redhat-release and the value parsed out of those files is &quot;CentOSLinux&quot;.

We should likely favour os-release, which resolves this issue in practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67891</commentid>
    <comment_count>1</comment_count>
    <who name="Bas Mevissen">abuse</who>
    <bug_when>2016-11-03 12:59:14 +0000</bug_when>
    <thetext>As a side note, a possible reason of having lsb_release installed is by having the Google Chrome browser installed which requires lsb &gt;= 4.0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67913</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-03 15:23:50 +0000</bug_when>
    <thetext>*** Bug 10577 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68022</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-07 13:48:55 +0000</bug_when>
    <thetext>We can make this even less likely to be an issue if we also switch to using the ID field from os-release, rather than NAME, and returning a lowercase identifier from the distro_identifier() function.

For each host distribution supported by the Yocto Project, other than openSUSE, this would result in the same identifier being returned regardless of whether it was the source was os-release or lsb_release.

 Distribution | Version | Distributor ID   | NAME             | ID       |
 -------------------------------------------------------------------------
 CentOS       | 7       | CentOS           | CentOS Linux     | centos   |
 Debian       | 8       | Debian           | Debian GNU/Linux | debian   |
 Fedora       | 23      | Fedora           | Fedora           | fedora   |
 Fedora       | 24      | Fedora           | Fedora           | fedora   |
 openSUSE     | 13.2    | openSUSE project | openSUSE         | opensuse |
 openSUSE     | 42.1    | SUSE LINUX       | openSUSE Leap    | opensuse |
 Ubuntu       | 14.04   | Ubuntu           | Ubuntu           | ubuntu   |
 Ubuntu       | 16.04   | Ubuntu           | Ubuntu           | ubuntu   |</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68051</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-07 22:51:09 +0000</bug_when>
    <thetext>Patches submitted to oe-core to improve the distro reporting mechanism:
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128496.html

and to meta-yocto to adapt to these changes:
https://lists.yoctoproject.org/pipermail/poky/2016-November/010789.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68088</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-08 14:57:28 +0000</bug_when>
    <thetext>v2 series submitted to oe-core to better handle some of the variations in os-release format:

http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128528.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68554</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-11-23 21:05:11 +0000</bug_when>
    <thetext>Resolved in OE-Core:
* http://git.openembedded.org/openembedded-core/commit/?id=2ddd6ddaf0c5ba14ae83347eba877ac9ef179c76
* http://git.openembedded.org/openembedded-core/commit/?id=fc4eddecddec68d03a985086fa32db40ad0c7bfc
* http://git.openembedded.org/openembedded-core/commit/?id=8689e5618d45c2119134ea64754430c06a93ea09
* http://git.openembedded.org/openembedded-core/commit/?id=e36066dcc3b56cac1c695370ea178b566c0ebfd6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>