summaryrefslogtreecommitdiff
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@intel.com>2010-08-26 19:46:40 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-02 09:38:35 +0100
commit68385456af93a6a80c558676fd176e3ec81c9183 (patch)
treedca279051ea1de9bb274f7af03f8f112d9c1cf20 /meta/lib/oe
parent444e44806530e90300135cc66cf7d160beb1b4be (diff)
downloadopenembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.tar.gz
openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.tar.bz2
openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.zip
distro_check: fix for natives, cross, and initial recipe types
datetime checking is changed to be once per day Signed-off-by: Saul Wold <Saul.Wold@intel.com> distro_check: fix for natives, cross, and initial recipe types Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/distro_check.py33
1 files changed, 29 insertions, 4 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 58972585a6..3f61630d1a 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -230,7 +230,7 @@ def update_distro_data(distro_check_dir, datetime):
f = open(datetime_file, "r+b")
fcntl.lockf(f, fcntl.LOCK_EX)
saved_datetime = f.read()
- if saved_datetime != datetime:
+ if saved_datetime[0:8] != datetime[0:8]:
bb.note("The build datetime did not match: saved:%s current:%s" % (saved_datetime, datetime))
bb.note("Regenerating distro package lists")
create_distro_packages_list(distro_check_dir)
@@ -247,10 +247,33 @@ def compare_in_distro_packages_list(distro_check_dir, d):
if not os.path.isdir(distro_check_dir):
raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed")
+ localdata = bb.data.createCopy(d)
pkglst_dir = os.path.join(distro_check_dir, "package_lists")
matching_distros = []
+ pn = bb.data.getVar('PN', d, True)
recipe_name = bb.data.getVar('PN', d, True)
- tmp = bb.data.getVar('DISTRO_PN_ALIAS', d, True)
+ bb.note("Checking: %s" % pn)
+
+ if pn.find("-native") != -1:
+ pnstripped = pn.split("-native")
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+ recipe_name = pnstripped[0]
+
+ if pn.find("-cross") != -1:
+ pnstripped = pn.split("-cross")
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+ recipe_name = pnstripped[0]
+
+ if pn.find("-initial") != -1:
+ pnstripped = pn.split("-initial")
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+ recipe_name = pnstripped[0]
+
+ bb.note("Recipe: %s" % recipe_name)
+ tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True)
distro_pn_aliases = {}
if tmp:
list = tmp.split(' ')
@@ -271,6 +294,8 @@ def compare_in_distro_packages_list(distro_check_dir, d):
f.close()
break
f.close()
+
+ bb.note("Matching: %s" % matching_distros)
return matching_distros
def save_distro_check_result(result, datetime, d):
@@ -281,8 +306,8 @@ def save_distro_check_result(result, datetime, d):
return
if not os.path.isdir(logdir):
os.makedirs(logdir)
- result_file = os.path.join(logdir, "distro_check-" + datetime + ".results")
- line = pn + " : "
+ result_file = os.path.join(logdir, "distrocheck.csv")
+ line = pn + ", "
for i in result:
line = line + i + ", "
if result: