Skip to contentSkip to conversation

sanity: use lsb distro_identifier

RFC In review Martin Jansa 2 participants 2 messages Feb 18, 2013 – Feb 19, 2013

lore
Share & tools
lore
#0 lore raw

RFC 1/1 sanity: use lsb distro_identifier

* distro_identifier returns lsb_data['Distributor ID']-lsb_data['Release'] which in some cases is different then lsb_release -d -s, e.g. Distributor ID: Ubuntu

  Description:    Ubuntu 12.04 LTS
  Release:        12.04
  Codename:       precise

But we probably don't need to sanity list each point release in LTS and sstate is already using distro_identifier as prefix for native sstate archives
* This will need update to SANITY_TESTED_DISTROS (at least s/Ubuntu 12.04 LTS/Ubuntu-12.04/g etc), that's why sending as RFC first.

---
 meta/classes/sanity.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/classes/sanity.bbclass +1 -4
index d3bf05a..94c6ce3 100644
@@ -280,11 +280,8 @@ def check_supported_distro(sanity_data):
             f.close()
     else:
         # Use LSB method
-        import subprocess as sub
         try:
-            p = sub.Popen(['lsb_release','-d','-s'],stdout=sub.PIPE,stderr=sub.PIPE)
-            out, err = p.communicate()
-            distro = out.rstrip()
+            distro = oe.lsb.distro_identifier()
         except Exception:
             distro = None
 
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 6 lines · Martin Jansa

* distro_identifier returns lsb_data['Distributor ID']-lsb_data['Release'] which in some cases is different then lsb_release -d -s, e.g. Distributor ID: Ubuntu

  Description:    Ubuntu 12.04 LTS
  Release:        12.04
  Codename:       precise
Quoted 8 lines

But we probably don't need to sanity list each point release in LTS and sstate is already using distro_identifier as prefix for native sstate archives
* This will need update to SANITY_TESTED_DISTROS (at least s/Ubuntu 12.04 LTS/Ubuntu-12.04/g etc), that's why sending as RFC first.

It makes sense for me. It easy the maintainence of the tested distros list.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br