Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] distro_check.py: Fix some bugs in distro_check.py
  2011-04-28 14:40 [PATCH 0/1]distro_check.py: Fix some bugs in distro_check.py Mei Lei
@ 2011-04-28 14:39 ` Mei Lei
  0 siblings, 0 replies; 2+ messages in thread
From: Mei Lei @ 2011-04-28 14:39 UTC (permalink / raw)
  To: openembedded-core

From: Mei Lei <lei.mei@intel.com>

The recipe meta-ide-support's alias is Poky, but not defined in distro_exceptions, this will lead an error.
The compare_in_distro_packages_list function omit a split process, this will lead to a form issue.
Change the log file generate way, use symbolic links link to the latest log file, instead of appending every log file in old log.

Signed-off-by: Mei Lei <lei.mei@intel.com>
---
 meta/lib/oe/distro_check.py |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index d6abd9b..c85d4fb 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -302,7 +302,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'})
+    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(' ')
@@ -335,8 +335,9 @@ def compare_in_distro_packages_list(distro_check_dir, d):
 
     
     if tmp != None:
-         matching_distros.append(tmp)
-
+	list = tmp.split(' ')
+	for item in list:
+            matching_distros.append(item)
     bb.note("Matching: %s" % matching_distros)
     return matching_distros
 
@@ -348,13 +349,17 @@ def save_distro_check_result(result, datetime, d):
         return
     if not os.path.isdir(logdir):
         os.makedirs(logdir)
-    result_file = os.path.join(logdir, "distrocheck.csv")
+    result_file = os.path.join(logdir, "distrocheck.%s.csv" % datetime)
     line = pn
     for i in result:
         line = line + "," + i
     if not os.path.exists(result_file):
-        open(result_file, 'w+b').close() # touch the file so that the next open won't fail
-    f = open(result_file, "a+b")
+        sresult_file = os.path.join(logdir, "distrocheck.csv")
+	if os.path.exists(sresult_file):
+	    os.remove(sresult_file)
+	os.system("touch %s" % result_file)
+	os.symlink(result_file, sresult_file)
+    f = open(result_file, "a")
     import fcntl
     fcntl.lockf(f, fcntl.LOCK_EX)
     f.seek(0, os.SEEK_END) # seek to the end of file
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 0/1]distro_check.py: Fix some bugs in distro_check.py
@ 2011-04-28 14:40 Mei Lei
  2011-04-28 14:39 ` [PATCH 1/1] distro_check.py: " Mei Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Mei Lei @ 2011-04-28 14:40 UTC (permalink / raw)
  To: openembedded-core

From: Mei Lei <lei.mei@intel.com>

This pull request will fix some bugs in meta/lib/oe/distro_check.py.

The recipe meta-ide-support's alias is Poky, but not defined in distro_exceptions, this will lead an error.
The compare_in_distro_packages_list function omit a split process, this will lead to a form issue.
Change the log file generate way, use symbolic links link to the latest log file, instead of appending every log file in old log.

Thanks
Lei

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: lmei3/distrocheck.py
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=lmei3/distrocheck.py

Thanks,
    Mei Lei <lei.mei@intel.com>
---


Mei Lei (1):
  distro_check.py: Fix some bugs in distro_check.py

 meta/lib/oe/distro_check.py |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-28 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 14:40 [PATCH 0/1]distro_check.py: Fix some bugs in distro_check.py Mei Lei
2011-04-28 14:39 ` [PATCH 1/1] distro_check.py: " Mei Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox