summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/distrodata.bbclass40
1 files changed, 31 insertions, 9 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index 221dfae9f3..bb93336ad3 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -21,7 +21,7 @@ python distro_eventhandler() {
21 21
22 lf = bb.utils.lockfile(logfile + ".lock") 22 lf = bb.utils.lockfile(logfile + ".lock")
23 f = open(logfile, "a") 23 f = open(logfile, "a")
24 f.write("Package,Description,Maintainer,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status\n") 24 f.write("Package,Description,Owner,License,ChkSum,Status,VerMatch,Version,Upsteam,Non-Update,Reason,Recipe Status\n")
25 f.close() 25 f.close()
26 bb.utils.unlockfile(lf) 26 bb.utils.unlockfile(lf)
27 27
@@ -211,6 +211,33 @@ do_distrodataall() {
211 : 211 :
212} 212}
213 213
214addhandler checkpkg_eventhandler
215python checkpkg_eventhandler() {
216 from bb.event import Handled, NotHandled
217 # if bb.event.getName(e) == "TaskStarted":
218
219 if bb.event.getName(e) == "BuildStarted":
220 """initialize log files."""
221 logpath = bb.data.getVar('LOG_DIR', e.data, 1)
222 bb.utils.mkdirhier(logpath)
223 logfile = os.path.join(logpath, "checkpkg.%s.csv" % bb.data.getVar('DATETIME', e.data, 1))
224 if not os.path.exists(logfile):
225 slogfile = os.path.join(logpath, "checkpkg.csv")
226 if os.path.exists(slogfile):
227 os.remove(slogfile)
228 os.system("touch %s" % logfile)
229 os.symlink(logfile, slogfile)
230 bb.data.setVar('LOG_FILE', logfile, e.data)
231
232 lf = bb.utils.lockfile(logfile + ".lock")
233 f = open(logfile, "a")
234 f.write("Package\tOwner\tURI Type\tVersion\tTracking\tUpstream\tTMatch\tRMatch\n")
235 f.close()
236 bb.utils.unlockfile(lf)
237
238 return NotHandled
239}
240
214addtask checkpkg 241addtask checkpkg
215do_checkpkg[nostamp] = "1" 242do_checkpkg[nostamp] = "1"
216python do_checkpkg() { 243python do_checkpkg() {
@@ -436,13 +463,7 @@ python do_checkpkg() {
436 """initialize log files.""" 463 """initialize log files."""
437 logpath = bb.data.getVar('LOG_DIR', d, 1) 464 logpath = bb.data.getVar('LOG_DIR', d, 1)
438 bb.utils.mkdirhier(logpath) 465 bb.utils.mkdirhier(logpath)
439 logfile = os.path.join(logpath, "poky_pkg_info.log.%s" % bb.data.getVar('DATETIME', d, 1)) 466 logfile = os.path.join(logpath, "checkpkg.csv")
440 if not os.path.exists(logfile):
441 slogfile = os.path.join(logpath, "poky_pkg_info.log")
442 if os.path.exists(slogfile):
443 os.remove(slogfile)
444 os.system("touch %s" % logfile)
445 os.symlink(logfile, slogfile)
446 467
447 """generate package information from .bb file""" 468 """generate package information from .bb file"""
448 pname = bb.data.getVar('PN', d, 1) 469 pname = bb.data.getVar('PN', d, 1)
@@ -586,10 +607,11 @@ python do_checkpkg() {
586 else: 607 else:
587 pmstatus = "UPDATE" 608 pmstatus = "UPDATE"
588 609
610 maintainer = bb.data.getVar('RECIPE_MAINTAINER', d, True)
589 lf = bb.utils.lockfile(logfile + ".lock") 611 lf = bb.utils.lockfile(logfile + ".lock")
590 f = open(logfile, "a") 612 f = open(logfile, "a")
591 f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \ 613 f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \
592 (pname, pgrp, pproto, pcurver, pmver, pupver, pmstatus, pstatus, pdesc)) 614 (pname, maintainer, pproto, pcurver, pmver, pupver, pmstatus, pstatus))
593 f.close() 615 f.close()
594 bb.utils.unlockfile(lf) 616 bb.utils.unlockfile(lf)
595} 617}