summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-02-19 00:26:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-01 13:03:21 +0000
commita32ea459ca168792161af2d521a14fe00cffb4b3 (patch)
treefc2241dd4c9d4768841ce82fa36939d7f6603be1
parent34f3926f1787f9a2efa2257a2aaea6ee92adf8a3 (diff)
downloadopenembedded-core-a32ea459ca168792161af2d521a14fe00cffb4b3.tar.gz
openembedded-core-a32ea459ca168792161af2d521a14fe00cffb4b3.tar.bz2
openembedded-core-a32ea459ca168792161af2d521a14fe00cffb4b3.zip
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. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta/classes/sanity.bbclass5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d3bf05a803..94c6ce340f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -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