Patchwork [RC,Fixes,06/19] distrodata: fix distro_check code

login
register
mail settings
Submitter Saul Wold
Date Sept. 21, 2011, 9:39 a.m.
Message ID <1f6e2cd4edd48c30bf52c4287f16b06b0b6bd153.1316597628.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/11843/
State New, archived
Headers show

Comments

Saul Wold - Sept. 21, 2011, 9:39 a.m.
This fixes a problem with package names from inherits showing up

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/classes/distrodata.bbclass |   19 +++++++++++++++++--
 meta/lib/oe/distro_check.py     |    8 ++++----
 2 files changed, 21 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index e91200d..ce7b931 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -8,7 +8,7 @@  python distro_eventhandler() {
 	logfile = dc.create_log_file(e.data, "distrodata.csv")
 	lf = bb.utils.lockfile("%s.lock" % logfile)
 	f = open(logfile, "a")
-	f.write("Package,Description,Owner,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status\n")
+	f.write("Package,Description,Owner,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status,Distro 1,Distro 2,Distro 3\n")
         f.close()
         bb.utils.unlockfile(lf)
 
@@ -34,12 +34,24 @@  python do_distrodata_np() {
 	    bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
 	    bb.data.update_data(localdata)
 
+	if pn.find("-nativesdk") != -1:
+	    pnstripped = pn.split("-nativesdk")
+	    bb.note("Native Split: %s" % pnstripped)
+	    bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+	    bb.data.update_data(localdata)
+
 	if pn.find("-cross") != -1:
 	    pnstripped = pn.split("-cross")
 	    bb.note("cross Split: %s" % pnstripped)
 	    bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
 	    bb.data.update_data(localdata)
 
+	if pn.find("-crosssdk") != -1:
+	    pnstripped = pn.split("-crosssdk")
+	    bb.note("cross Split: %s" % pnstripped)
+	    bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+	    bb.data.update_data(localdata)
+
 	if pn.find("-initial") != -1:
 	    pnstripped = pn.split("-initial")
 	    bb.note("initial Split: %s" % pnstripped)
@@ -181,7 +193,7 @@  python do_distrodata() {
 
 	lf = bb.utils.lockfile("%s.lock" % logfile)
 	f = open(logfile, "a")
-	f.write("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s," % \
+	f.write("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s" % \
 		  (pname, pdesc, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus))
         line = ""
         for i in result:
@@ -671,6 +683,9 @@  python do_distro_check() {
     import oe.distro_check as dc
     import bb
     import shutil
+    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):
+        return
+
     localdata = bb.data.createCopy(d)
     bb.data.update_data(localdata)
     tmpdir = bb.data.getVar('TMPDIR', d, True)
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 55cdcad..4721355 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):
 def get_latest_released_meego_source_package_list():
     "Returns list of all the name os packages in the latest meego distro"
 
-    if not os.path.isfile("/tmp/Meego-1.0"):
-        os.mknod("/tmp/Meego-1.0")
-    f = open("/tmp/Meego-1.0", "r")
+    if not os.path.isfile("/tmp/Meego-1.1"):
+        os.mknod("/tmp/Meego-1.1")
+    f = open("/tmp/Meego-1.1", "r")
     package_names = []
     for line in f:
         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):
     bb.note("Recipe: %s" % recipe_name)
     tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True)
 
-    distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'})
+    distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'})
 
     if tmp:
         list = tmp.split(' ')