[yocto] [[PATCH][AUH] 1/2] buildhistory.py: Add the ability for generate full and simple output.

Aníbal Limón anibal.limon at linux.intel.com
Wed Jan 13 13:52:10 PST 2016


Now buildhistroy generate two diff files,

	- buildhistory-diff.txt: Simple diff generated without -a
	  option.
	- buildhistory-diff-full.txt: Full diff generated contains
	  all the packages including -dbg and -dev.

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 modules/buildhistory.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/modules/buildhistory.py b/modules/buildhistory.py
index d8ca46d..9085233 100644
--- a/modules/buildhistory.py
+++ b/modules/buildhistory.py
@@ -61,15 +61,21 @@ class BuildHistory(object):
         rev_initial = self.revs[0]
         rev_final = self.revs[-1]
 
-        cmd = "buildhistory-diff -a -p %s %s %s"  % (self.buildhistory_dir, 
-                rev_initial, rev_final)
-
         try:
+            cmd = "buildhistory-diff -p %s %s %s"  % (self.buildhistory_dir, 
+                rev_initial, rev_final)
             stdout, stderr = bb.process.run(cmd)
-
             if stdout and os.path.exists(self.workdir):
                 with open(os.path.join(self.workdir, "buildhistory-diff.txt"),
                         "w+") as log:
                     log.write(stdout)
+
+            cmd_full = "buildhistory-diff -a -p %s %s %s"  % (self.buildhistory_dir, 
+                        rev_initial, rev_final)
+            stdout, stderr = bb.process.run(cmd_full)
+            if stdout and os.path.exists(self.workdir):
+                with open(os.path.join(self.workdir, "buildhistory-diff-full.txt"),
+                        "w+") as log:
+                    log.write(stdout)
         except bb.process.ExecutionError as e:
             W( "%s: Buildhistory checking fails\n%s" % (self.pn, e.stdout))
-- 
2.1.4




More information about the yocto mailing list