diff options
Diffstat (limited to 'meta/classes/distrodata.bbclass')
-rw-r--r-- | meta/classes/distrodata.bbclass | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass index cedacc214c..3ff62684aa 100644 --- a/meta/classes/distrodata.bbclass +++ b/meta/classes/distrodata.bbclass | |||
@@ -1,15 +1,14 @@ | |||
1 | include conf/distro/include/package_regex.inc | 1 | include conf/distro/include/package_regex.inc |
2 | addhandler distro_eventhandler | 2 | addhandler distro_eventhandler |
3 | distro_eventhandler[eventmask] = "bb.event.BuildStarted" | ||
3 | python distro_eventhandler() { | 4 | python distro_eventhandler() { |
4 | 5 | import oe.distro_check as dc | |
5 | if bb.event.getName(e) == "BuildStarted": | 6 | logfile = dc.create_log_file(e.data, "distrodata.csv") |
6 | import oe.distro_check as dc | 7 | lf = bb.utils.lockfile("%s.lock" % logfile) |
7 | logfile = dc.create_log_file(e.data, "distrodata.csv") | 8 | f = open(logfile, "a") |
8 | lf = bb.utils.lockfile("%s.lock" % logfile) | 9 | f.write("Package,Description,Owner,License,VerMatch,Version,Upsteam,Reason,Recipe Status,Distro 1,Distro 2,Distro 3\n") |
9 | f = open(logfile, "a") | 10 | f.close() |
10 | f.write("Package,Description,Owner,License,VerMatch,Version,Upsteam,Reason,Recipe Status,Distro 1,Distro 2,Distro 3\n") | 11 | bb.utils.unlockfile(lf) |
11 | f.close() | ||
12 | bb.utils.unlockfile(lf) | ||
13 | 12 | ||
14 | return | 13 | return |
15 | } | 14 | } |
@@ -197,6 +196,7 @@ do_distrodataall() { | |||
197 | } | 196 | } |
198 | 197 | ||
199 | addhandler checkpkg_eventhandler | 198 | addhandler checkpkg_eventhandler |
199 | checkpkg_eventhandler[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted" | ||
200 | python checkpkg_eventhandler() { | 200 | python checkpkg_eventhandler() { |
201 | def parse_csv_file(filename): | 201 | def parse_csv_file(filename): |
202 | package_dict = {} | 202 | package_dict = {} |
@@ -793,11 +793,11 @@ do_checkpkgall() { | |||
793 | } | 793 | } |
794 | 794 | ||
795 | addhandler distro_check_eventhandler | 795 | addhandler distro_check_eventhandler |
796 | distro_check_eventhandler bb.event.BuildStarted | ||
796 | python distro_check_eventhandler() { | 797 | python distro_check_eventhandler() { |
797 | if bb.event.getName(e) == "BuildStarted": | 798 | """initialize log files.""" |
798 | """initialize log files.""" | 799 | import oe.distro_check as dc |
799 | import oe.distro_check as dc | 800 | result_file = dc.create_log_file(e.data, "distrocheck.csv") |
800 | result_file = dc.create_log_file(e.data, "distrocheck.csv") | ||
801 | return | 801 | return |
802 | } | 802 | } |
803 | 803 | ||
@@ -839,16 +839,16 @@ do_distro_checkall() { | |||
839 | #then we can search those recipes which license text isn't exsit in common-licenses directory | 839 | #then we can search those recipes which license text isn't exsit in common-licenses directory |
840 | # | 840 | # |
841 | addhandler checklicense_eventhandler | 841 | addhandler checklicense_eventhandler |
842 | checklicense_eventhandler[eventmask] = "bb.event.BuildStarted" | ||
842 | python checklicense_eventhandler() { | 843 | python checklicense_eventhandler() { |
843 | if bb.event.getName(e) == "BuildStarted": | 844 | """initialize log files.""" |
844 | """initialize log files.""" | 845 | import oe.distro_check as dc |
845 | import oe.distro_check as dc | 846 | logfile = dc.create_log_file(e.data, "missinglicense.csv") |
846 | logfile = dc.create_log_file(e.data, "missinglicense.csv") | 847 | lf = bb.utils.lockfile("%s.lock" % logfile) |
847 | lf = bb.utils.lockfile("%s.lock" % logfile) | 848 | f = open(logfile, "a") |
848 | f = open(logfile, "a") | 849 | f.write("Package\tLicense\tMissingLicense\n") |
849 | f.write("Package\tLicense\tMissingLicense\n") | 850 | f.close() |
850 | f.close() | 851 | bb.utils.unlockfile(lf) |
851 | bb.utils.unlockfile(lf) | ||
852 | return | 852 | return |
853 | } | 853 | } |
854 | 854 | ||