diff options
author | Saul Wold <sgw@linux.intel.com> | 2011-09-20 13:40:48 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-21 13:42:50 +0100 |
commit | efc88ff0108e15b464c849a061406783c1fb0a39 (patch) | |
tree | b1f1dea57a44f67d3b2bfcd93ed6ca4b1fd00da1 /meta | |
parent | c2db80b4de0fea9666e2dbe834de2c0771a47b9e (diff) | |
download | poky-efc88ff0108e15b464c849a061406783c1fb0a39.tar.gz |
distrodata: fix distro_check code
This fixes a problem with package names from inherits showing up
(From OE-Core rev: edb2a11994ac21e790155ea519bded4b37ef9307)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/distrodata.bbclass | 19 | ||||
-rw-r--r-- | meta/lib/oe/distro_check.py | 8 |
2 files changed, 21 insertions, 6 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass index e91200d91e..ce7b931b13 100644 --- a/meta/classes/distrodata.bbclass +++ b/meta/classes/distrodata.bbclass | |||
@@ -8,7 +8,7 @@ python distro_eventhandler() { | |||
8 | logfile = dc.create_log_file(e.data, "distrodata.csv") | 8 | logfile = dc.create_log_file(e.data, "distrodata.csv") |
9 | lf = bb.utils.lockfile("%s.lock" % logfile) | 9 | lf = bb.utils.lockfile("%s.lock" % logfile) |
10 | f = open(logfile, "a") | 10 | f = open(logfile, "a") |
11 | f.write("Package,Description,Owner,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status\n") | 11 | f.write("Package,Description,Owner,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status,Distro 1,Distro 2,Distro 3\n") |
12 | f.close() | 12 | f.close() |
13 | bb.utils.unlockfile(lf) | 13 | bb.utils.unlockfile(lf) |
14 | 14 | ||
@@ -34,12 +34,24 @@ python do_distrodata_np() { | |||
34 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | 34 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) |
35 | bb.data.update_data(localdata) | 35 | bb.data.update_data(localdata) |
36 | 36 | ||
37 | if pn.find("-nativesdk") != -1: | ||
38 | pnstripped = pn.split("-nativesdk") | ||
39 | bb.note("Native Split: %s" % pnstripped) | ||
40 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | ||
41 | bb.data.update_data(localdata) | ||
42 | |||
37 | if pn.find("-cross") != -1: | 43 | if pn.find("-cross") != -1: |
38 | pnstripped = pn.split("-cross") | 44 | pnstripped = pn.split("-cross") |
39 | bb.note("cross Split: %s" % pnstripped) | 45 | bb.note("cross Split: %s" % pnstripped) |
40 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | 46 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) |
41 | bb.data.update_data(localdata) | 47 | bb.data.update_data(localdata) |
42 | 48 | ||
49 | if pn.find("-crosssdk") != -1: | ||
50 | pnstripped = pn.split("-crosssdk") | ||
51 | bb.note("cross Split: %s" % pnstripped) | ||
52 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | ||
53 | bb.data.update_data(localdata) | ||
54 | |||
43 | if pn.find("-initial") != -1: | 55 | if pn.find("-initial") != -1: |
44 | pnstripped = pn.split("-initial") | 56 | pnstripped = pn.split("-initial") |
45 | bb.note("initial Split: %s" % pnstripped) | 57 | bb.note("initial Split: %s" % pnstripped) |
@@ -181,7 +193,7 @@ python do_distrodata() { | |||
181 | 193 | ||
182 | lf = bb.utils.lockfile("%s.lock" % logfile) | 194 | lf = bb.utils.lockfile("%s.lock" % logfile) |
183 | f = open(logfile, "a") | 195 | f = open(logfile, "a") |
184 | f.write("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s," % \ | 196 | f.write("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s" % \ |
185 | (pname, pdesc, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus)) | 197 | (pname, pdesc, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus)) |
186 | line = "" | 198 | line = "" |
187 | for i in result: | 199 | for i in result: |
@@ -671,6 +683,9 @@ python do_distro_check() { | |||
671 | import oe.distro_check as dc | 683 | import oe.distro_check as dc |
672 | import bb | 684 | import bb |
673 | import shutil | 685 | import shutil |
686 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk',d): | ||
687 | return | ||
688 | |||
674 | localdata = bb.data.createCopy(d) | 689 | localdata = bb.data.createCopy(d) |
675 | bb.data.update_data(localdata) | 690 | bb.data.update_data(localdata) |
676 | tmpdir = bb.data.getVar('TMPDIR', d, True) | 691 | tmpdir = bb.data.getVar('TMPDIR', d, True) |
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py index 55cdcad461..4721355bd8 100644 --- a/meta/lib/oe/distro_check.py +++ b/meta/lib/oe/distro_check.py | |||
@@ -73,9 +73,9 @@ def clean_package_list(package_list): | |||
73 | def get_latest_released_meego_source_package_list(): | 73 | def get_latest_released_meego_source_package_list(): |
74 | "Returns list of all the name os packages in the latest meego distro" | 74 | "Returns list of all the name os packages in the latest meego distro" |
75 | 75 | ||
76 | if not os.path.isfile("/tmp/Meego-1.0"): | 76 | if not os.path.isfile("/tmp/Meego-1.1"): |
77 | os.mknod("/tmp/Meego-1.0") | 77 | os.mknod("/tmp/Meego-1.1") |
78 | f = open("/tmp/Meego-1.0", "r") | 78 | f = open("/tmp/Meego-1.1", "r") |
79 | package_names = [] | 79 | package_names = [] |
80 | for line in f: | 80 | for line in f: |
81 | package_names.append(line[:-1] + ":" + "main") # Also strip the '\n' at the end | 81 | package_names.append(line[:-1] + ":" + "main") # Also strip the '\n' at the end |
@@ -303,7 +303,7 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
303 | bb.note("Recipe: %s" % recipe_name) | 303 | bb.note("Recipe: %s" % recipe_name) |
304 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) | 304 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) |
305 | 305 | ||
306 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) | 306 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) |
307 | 307 | ||
308 | if tmp: | 308 | if tmp: |
309 | list = tmp.split(' ') | 309 | list = tmp.split(' ') |