summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/distrodata.bbclass59
-rw-r--r--meta/classes/utility-tasks.bbclass2
-rw-r--r--meta/lib/oe/distro_check.py18
3 files changed, 60 insertions, 19 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index c317083653..f6642f0f13 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -19,6 +19,12 @@ python distro_eventhandler() {
19 os.symlink(logfile, slogfile) 19 os.symlink(logfile, slogfile)
20 bb.data.setVar('LOG_FILE', logfile, e.data) 20 bb.data.setVar('LOG_FILE', logfile, e.data)
21 21
22 lf = bb.utils.lockfile(logfile + ".lock")
23 f = open(logfile, "a")
24 f.write("Package,Description,Maintainer,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status\n")
25 f.close()
26 bb.utils.unlockfile(lf)
27
22 return NotHandled 28 return NotHandled
23} 29}
24 30
@@ -29,6 +35,12 @@ python do_distrodata_np() {
29 pn = bb.data.getVar("PN", d, True) 35 pn = bb.data.getVar("PN", d, True)
30 bb.note("Package Name: %s" % pn) 36 bb.note("Package Name: %s" % pn)
31 37
38 import oe.distro_check as dist_check
39 tmpdir = bb.data.getVar('TMPDIR', d, 1)
40 distro_check_dir = os.path.join(tmpdir, "distro_check")
41 datetime = bb.data.getVar('DATETIME', localdata, 1)
42 dist_check.update_distro_data(distro_check_dir, datetime)
43
32 if pn.find("-native") != -1: 44 if pn.find("-native") != -1:
33 pnstripped = pn.split("-native") 45 pnstripped = pn.split("-native")
34 bb.note("Native Split: %s" % pnstripped) 46 bb.note("Native Split: %s" % pnstripped)
@@ -51,6 +63,10 @@ python do_distrodata_np() {
51 pname = bb.data.getVar('PN', localdata, True) 63 pname = bb.data.getVar('PN', localdata, True)
52 pcurver = bb.data.getVar('PV', localdata, True) 64 pcurver = bb.data.getVar('PV', localdata, True)
53 pdesc = bb.data.getVar('DESCRIPTION', localdata, True) 65 pdesc = bb.data.getVar('DESCRIPTION', localdata, True)
66 if pdesc is not None:
67 pdesc = pdesc.replace(',','')
68 pdesc = pdesc.replace('\n','')
69
54 pgrp = bb.data.getVar('SECTION', localdata, True) 70 pgrp = bb.data.getVar('SECTION', localdata, True)
55 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_') 71 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_')
56 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True): 72 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True):
@@ -64,18 +80,20 @@ python do_distrodata_np() {
64 hasrstatus="0" 80 hasrstatus="0"
65 81
66 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True) 82 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True)
83 if rstatus is not None:
84 rstatus = rstatus.replace(',','')
67 85
68 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True) 86 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True)
69 if pcurver == pupver: 87 if pcurver == pupver:
70 vermatch="1" 88 vermatch="1"
71 else: 89 else:
72 vermatch="0" 90 vermatch="0"
73
74 noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True) 91 noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True)
75 if noupdate_reason is None: 92 if noupdate_reason is None:
76 noupdate="0" 93 noupdate="0"
77 else: 94 else:
78 noupdate="1" 95 noupdate="1"
96 noupdate_reason = noupdate_reason.replace(',','')
79 97
80 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True) 98 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True)
81 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True) 99 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True)
@@ -83,9 +101,14 @@ python do_distrodata_np() {
83 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True) 101 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True)
84 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True) 102 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True)
85 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True) 103 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True)
86 104 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
87 bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \ 105
88 (pname, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus)) 106 bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \
107 (pname, pdesc, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus))
108 line = pn
109 for i in result:
110 line = line + "," + i
111 bb.note("%s\n" % line)
89} 112}
90 113
91addtask distrodata 114addtask distrodata
@@ -94,9 +117,14 @@ python do_distrodata() {
94 logpath = bb.data.getVar('LOG_DIR', d, 1) 117 logpath = bb.data.getVar('LOG_DIR', d, 1)
95 bb.utils.mkdirhier(logpath) 118 bb.utils.mkdirhier(logpath)
96 logfile = os.path.join(logpath, "distrodata.csv") 119 logfile = os.path.join(logpath, "distrodata.csv")
97 bb.note("LOG_FILE: %s\n" % logfile)
98 120
121 import oe.distro_check as dist_check
99 localdata = bb.data.createCopy(d) 122 localdata = bb.data.createCopy(d)
123 tmpdir = bb.data.getVar('TMPDIR', d, 1)
124 distro_check_dir = os.path.join(tmpdir, "distro_check")
125 datetime = bb.data.getVar('DATETIME', localdata, 1)
126 dist_check.update_distro_data(distro_check_dir, datetime)
127
100 pn = bb.data.getVar("PN", d, True) 128 pn = bb.data.getVar("PN", d, True)
101 bb.note("Package Name: %s" % pn) 129 bb.note("Package Name: %s" % pn)
102 130
@@ -122,6 +150,10 @@ python do_distrodata() {
122 pname = bb.data.getVar('PN', localdata, True) 150 pname = bb.data.getVar('PN', localdata, True)
123 pcurver = bb.data.getVar('PV', localdata, True) 151 pcurver = bb.data.getVar('PV', localdata, True)
124 pdesc = bb.data.getVar('DESCRIPTION', localdata, True) 152 pdesc = bb.data.getVar('DESCRIPTION', localdata, True)
153 if pdesc is not None:
154 pdesc = pdesc.replace(',','')
155 pdesc = pdesc.replace('\n','')
156
125 pgrp = bb.data.getVar('SECTION', localdata, True) 157 pgrp = bb.data.getVar('SECTION', localdata, True)
126 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_') 158 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_')
127 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True): 159 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True):
@@ -135,6 +167,8 @@ python do_distrodata() {
135 hasrstatus="0" 167 hasrstatus="0"
136 168
137 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True) 169 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True)
170 if rstatus is not None:
171 rstatus = rstatus.replace(',','')
138 172
139 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True) 173 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True)
140 if pcurver == pupver: 174 if pcurver == pupver:
@@ -147,6 +181,7 @@ python do_distrodata() {
147 noupdate="0" 181 noupdate="0"
148 else: 182 else:
149 noupdate="1" 183 noupdate="1"
184 noupdate_reason = noupdate_reason.replace(',','')
150 185
151 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True) 186 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True)
152 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True) 187 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True)
@@ -154,13 +189,19 @@ python do_distrodata() {
154 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True) 189 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True)
155 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True) 190 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True)
156 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True) 191 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True)
192 # do the comparison
193 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
157 194
158 lf = bb.utils.lockfile(logfile + ".lock") 195 lf = bb.utils.lockfile(logfile + ".lock")
159 f = open(logfile, "a") 196 f = open(logfile, "a")
160 f.write("%s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \ 197 f.write("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s," % \
161 (pname, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus)) 198 (pname, pdesc, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus))
162 f.close() 199 line = ""
163 bb.utils.unlockfile(lf) 200 for i in result:
201 line = line + "," + i
202 f.write(line + "\n")
203 f.close()
204 bb.utils.unlockfile(lf)
164} 205}
165 206
166addtask distrodataall after do_distrodata 207addtask distrodataall after do_distrodata
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index 8e905308be..205a206baf 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -488,7 +488,7 @@ do_buildall() {
488 : 488 :
489} 489}
490 490
491addhandler check_eventhandler 491#addhandler check_eventhandler
492python check_eventhandler() { 492python check_eventhandler() {
493 from bb.event import Handled, NotHandled 493 from bb.event import Handled, NotHandled
494 # if bb.event.getName(e) == "TaskStarted": 494 # if bb.event.getName(e) == "TaskStarted":
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 0d6f78befd..d69a03c0af 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -102,7 +102,7 @@ def get_latest_released_fedora_source_package_list():
102 102
103 package_names = get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/releases/%s/Fedora/source/SRPMS/" % latest, "main") 103 package_names = get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/releases/%s/Fedora/source/SRPMS/" % latest, "main")
104 104
105 package_names += get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/releases/%s/Everything/source/SPRMS/" % latest, "everything") 105# package_names += get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/releases/%s/Everything/source/SPRMS/" % latest, "everything")
106 package_names += get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/updates/%s/SRPMS/" % latest, "updates") 106 package_names += get_source_package_list_from_url("http://download.fedora.redhat.com/pub/fedora/linux/updates/%s/SRPMS/" % latest, "updates")
107 107
108 package_list=clean_package_list(package_names) 108 package_list=clean_package_list(package_names)
@@ -123,7 +123,7 @@ def get_latest_released_mandriva_source_package_list():
123 "Returns list of all the name os packages in the latest mandriva distro" 123 "Returns list of all the name os packages in the latest mandriva distro"
124 latest = find_latest_numeric_release("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/") 124 latest = find_latest_numeric_release("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/")
125 package_names = get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/release/" % latest, "main") 125 package_names = get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/release/" % latest, "main")
126 package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/contrib/release/" % latest, "contrib") 126# package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/contrib/release/" % latest, "contrib")
127 package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/updates/" % latest, "updates") 127 package_names += get_source_package_list_from_url("http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/%s/SRPMS/main/updates/" % latest, "updates")
128 128
129 package_list=clean_package_list(package_names) 129 package_list=clean_package_list(package_names)
@@ -170,8 +170,8 @@ def get_latest_released_debian_source_package_list():
170 latest = find_latest_debian_release("http://ftp.debian.org/debian/dists/") 170 latest = find_latest_debian_release("http://ftp.debian.org/debian/dists/")
171 url = "http://ftp.debian.org/debian/dists/stable/main/source/Sources.gz" 171 url = "http://ftp.debian.org/debian/dists/stable/main/source/Sources.gz"
172 package_names = get_debian_style_source_package_list(url, "main") 172 package_names = get_debian_style_source_package_list(url, "main")
173 url = "http://ftp.debian.org/debian/dists/stable/contrib/source/Sources.gz" 173# url = "http://ftp.debian.org/debian/dists/stable/contrib/source/Sources.gz"
174 package_names += get_debian_style_source_package_list(url, "contrib") 174# package_names += get_debian_style_source_package_list(url, "contrib")
175 url = "http://ftp.debian.org/debian/dists/stable-proposed-updates/main/source/Sources.gz" 175 url = "http://ftp.debian.org/debian/dists/stable-proposed-updates/main/source/Sources.gz"
176 package_names += get_debian_style_source_package_list(url, "updates") 176 package_names += get_debian_style_source_package_list(url, "updates")
177 package_list=clean_package_list(package_names) 177 package_list=clean_package_list(package_names)
@@ -190,10 +190,10 @@ def get_latest_released_ubuntu_source_package_list():
190 latest = find_latest_ubuntu_release("http://archive.ubuntu.com/ubuntu/dists/") 190 latest = find_latest_ubuntu_release("http://archive.ubuntu.com/ubuntu/dists/")
191 url = "http://archive.ubuntu.com/ubuntu/dists/%s/main/source/Sources.gz" % latest 191 url = "http://archive.ubuntu.com/ubuntu/dists/%s/main/source/Sources.gz" % latest
192 package_names = get_debian_style_source_package_list(url, "main") 192 package_names = get_debian_style_source_package_list(url, "main")
193 url = "http://archive.ubuntu.com/ubuntu/dists/%s/multiverse/source/Sources.gz" % latest 193# url = "http://archive.ubuntu.com/ubuntu/dists/%s/multiverse/source/Sources.gz" % latest
194 package_names += get_debian_style_source_package_list(url, "multiverse") 194# package_names += get_debian_style_source_package_list(url, "multiverse")
195 url = "http://archive.ubuntu.com/ubuntu/dists/%s/universe/source/Sources.gz" % latest 195# url = "http://archive.ubuntu.com/ubuntu/dists/%s/universe/source/Sources.gz" % latest
196 package_names += get_debian_style_source_package_list(url, "universe") 196# package_names += get_debian_style_source_package_list(url, "universe")
197 url = "http://archive.ubuntu.com/ubuntu/dists/%s-updates/main/source/Sources.gz" % latest 197 url = "http://archive.ubuntu.com/ubuntu/dists/%s-updates/main/source/Sources.gz" % latest
198 package_names += get_debian_style_source_package_list(url, "updates") 198 package_names += get_debian_style_source_package_list(url, "updates")
199 package_list=clean_package_list(package_names) 199 package_list=clean_package_list(package_names)
@@ -302,7 +302,7 @@ def compare_in_distro_packages_list(distro_check_dir, d):
302 bb.note("Recipe: %s" % recipe_name) 302 bb.note("Recipe: %s" % recipe_name)
303 tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) 303 tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True)
304 304
305 distro_exceptions = dict({"Poky":'Poky', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver'}) 305 distro_exceptions = dict({"Poky":'Poky', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver', "OSPDT":'OSPDT Approved'})
306 306
307 if tmp: 307 if tmp:
308 list = tmp.split(' ') 308 list = tmp.split(' ')