[2/7] classes/buildhistory: sort and de-dupe dependency graphs

Submitted by Paul Eggleton on Feb. 14, 2012, 1:40 p.m.

Details

Message ID c15ca060aa49fa80af002e794b27f22f75190c76.1329226672.git.paul.eggleton@linux.intel.com
State Accepted
Commit 830df6067c1ea4a5aab580b42ba7e1e84fe1bcbf
Headers show

Commit Message

Paul Eggleton Feb. 14, 2012, 1:40 p.m.
Sort dependencies of each package which sometimes change order and cause
noise in the buildhistory repo, and at the same time remove duplicates
(which seem to be common especially for the RPM package query output).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index d1a9670..0ee6a33 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -286,12 +286,12 @@  buildhistory_get_image_installed() {
 			echo $pkgsize $pkg >> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
 		fi
 
-		deps=`list_package_depends $pkg`
+		deps=`list_package_depends $pkg | sort | uniq`
 		for dep in $deps ; do
 			echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
 		done
 
-		recs=`list_package_recommends $pkg`
+		recs=`list_package_recommends $pkg | sort | uniq`
 		for rec in $recs ; do
 			echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
 		done