All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] distrodata.bbclass: Merge the get_pkg_info.log into checkpkg.csv
  2011-03-25  8:26 [PATCH 0/1]distrodata.bbclass: merge two log files into one Mei Lei
@ 2011-03-25  8:26 ` Mei Lei
  0 siblings, 0 replies; 2+ messages in thread
From: Mei Lei @ 2011-03-25  8:26 UTC (permalink / raw)
  To: poky

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

For easy view the check package result, merge the two files into checkpkg.csv, after that, the package report system will use checkpkg.csv instead of get_pkg_info.log.

Signed-off-by: Mei Lei <lei.mei@intel.com>
---
 meta/classes/distrodata.bbclass |   29 +++++++----------------------
 1 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index e2cc8fa..905dad7 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -225,17 +225,9 @@ python checkpkg_eventhandler() {
 
 	lf = bb.utils.lockfile(logfile + ".lock")
 	f = open(logfile, "a")
-	f.write("Package\tOwner\tURI Type\tVersion\tTracking\tUpstream\tTMatch\tRMatch\n")
+	f.write("Package\tVersion\tUpver\tLicense\tSection\tHome\tRelease\tPriority\tDepends\tBugTracker\tPE\tDescription\tStatus\tTracking\tURI\tMAINTAINER\n")
         f.close()
         bb.utils.unlockfile(lf)
-	"""initialize log files for package report system"""
-	logfile2 = os.path.join(logpath, "get_pkg_info.%s.log" % bb.data.getVar('DATETIME', e.data, 1))
-	if not os.path.exists(logfile2):
-		slogfile2 = os.path.join(logpath, "get_pkg_info.log")
-		if os.path.exists(slogfile2):
-			os.remove(slogfile2)
-		os.system("touch %s" % logfile2)
-		os.symlink(logfile2, slogfile2)
     return
 }
 
@@ -459,8 +451,6 @@ python do_checkpkg() {
 	logpath = bb.data.getVar('LOG_DIR', d, 1)
 	bb.utils.mkdirhier(logpath)
 	logfile = os.path.join(logpath, "checkpkg.csv")
-	"""initialize log files for package report system"""
-	logfile2 = os.path.join(logpath, "get_pkg_info.log")
 
 	"""generate package information from .bb file"""
 	pname = bb.data.getVar('PN', d, 1)
@@ -582,7 +572,7 @@ python do_checkpkg() {
 				result = bb.utils.vercmp(("0", puptag, ""), ("0", plocaltag, ""))
 				if result > 0:
 					verflag = 1
-					pstatus = "UPADTE"
+					pstatus = "UPDATE"
 					pupver = puptag
 				elif verflag == 0 :
 					pupver = plocaltag
@@ -646,20 +636,15 @@ python do_checkpkg() {
 			pmstatus = "UPDATE"
 	
 	maintainer = bb.data.getVar('RECIPE_MAINTAINER', d, True)
+	psrcuri = psrcuri.split()[0]
+	pdepends = "".join(pdepends.split("\t"))
+	pdesc = "".join(pdesc.split("\t"))
 	lf = bb.utils.lockfile(logfile + ".lock")
 	f = open(logfile, "a")
-	f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \
-		  (pname, maintainer, pproto, pcurver, pmver, pupver, pmstatus, pstatus))
+	f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \
+		  (pname,pversion,pupver,plicense,psection, phome,prelease, ppriority,pdepends,pbugtracker,ppe,pdesc,pstatus,pmver,psrcuri,maintainer))
 	f.close()
 	bb.utils.unlockfile(lf)
-
-	"""write into get_pkg_info log file to supply data for package report system"""
-	lf2 = bb.utils.lockfile(logfile2 + ".lock")
-	f2 = open(logfile2, "a")
-	f2.write("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n" % \
-		  (pname,pversion,pupver,plicense,psection, phome,prelease, ppriority,pdepends,pbugtracker,ppe,pdesc,pstatus,pmver,psrcuri))
-	f2.close()
-	bb.utils.unlockfile(lf2)
 }
 
 addtask checkpkgall after do_checkpkg
-- 
1.6.3.3



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

* [PATCH 0/1]distrodata.bbclass: merge two log files into one
@ 2011-03-25  8:26 Mei Lei
  2011-03-25  8:26 ` [PATCH 1/1] distrodata.bbclass: Merge the get_pkg_info.log into checkpkg.csv Mei Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Mei Lei @ 2011-03-25  8:26 UTC (permalink / raw)
  To: poky

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

Hi Saul,
	As your requirement, I have merged get_pkg_info.log into checkpkg.csv, after that, we will use only one file to track packages status.

Thansk
Lei

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

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


Mei Lei (1):
  distrodata.bbclass: Merge the get_pkg_info.log into checkpkg.csv

 meta/classes/distrodata.bbclass |   29 +++++++----------------------
 1 files changed, 7 insertions(+), 22 deletions(-)



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

end of thread, other threads:[~2011-03-25  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25  8:26 [PATCH 0/1]distrodata.bbclass: merge two log files into one Mei Lei
2011-03-25  8:26 ` [PATCH 1/1] distrodata.bbclass: Merge the get_pkg_info.log into checkpkg.csv Mei Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.