There are various conditions that lead to duplicate entries in the dot graph which need to get fixed, but this patch is a catchall.
Another benefit is that the sort order is now know, leading to less spurious diffs in buildhistory commits. Signed-off-by: Koen Kooi <[email protected]> --- meta/classes/buildhistory.bbclass | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 3aec325..6502b04 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -291,6 +291,7 @@ buildhistory_get_image_installed() { # Produce installed package file and size lists and dependency graph echo -n > ${BUILDHISTORY_DIR_IMAGE}/installed-packages.txt echo -n > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp + echo -n > ${BUILDHISTORY_DIR_IMAGE}/depends.tmp echo -e "digraph depends {\n node [shape=plaintext]" > ${BUILDHISTORY_DIR_IMAGE}/depends.dot for pkg in $INSTALLED_PKGS; do pkgfile=`get_package_filename $pkg` @@ -302,14 +303,16 @@ buildhistory_get_image_installed() { 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 + echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.tmp done 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 + echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.tmp done done + cat ${BUILDHISTORY_DIR_IMAGE}/depends.tmp | sort | uniq >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot + rm ${BUILDHISTORY_DIR_IMAGE}/depends.tmp echo "}" >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot cat ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.txt -- 1.7.2.5 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
