summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2017-06-09 21:34:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 23:01:22 +0100
commita19d31da4b5e1965cde6d04448e89b0d0e4b35ea (patch)
tree1fb1c89cc845351a053c09afa316189468bad58d /meta/classes
parentd30591b496ea2d347b7ac4d9c0e080289e3fce87 (diff)
downloadpoky-a19d31da4b5e1965cde6d04448e89b0d0e4b35ea.tar.gz
buildhistory.bbclass: Improve the generated depends.dot file
* Convert incorrectly formatted dependencies such as: "bar -> "foo" ">=" "1.2.3" into dependencies with edge labels: "bar -> "foo" [label=">= 1.2.3"] * Remove rpmlib() and config() dependencies such as: "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"] and: "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"] * Remove the trailing semicolon that was added to each line. It fills no purpose. (From OE-Core rev: 37ea2c8b299483f0e12fad66efa789c6445571e0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/buildhistory.bbclass15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 64cd31ae2b..c26dffc058 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -435,13 +435,20 @@ buildhistory_get_installed() {
435 435
436 # Produce dependency graph 436 # Produce dependency graph
437 # First, quote each name to handle characters that cause issues for dot 437 # First, quote each name to handle characters that cause issues for dot
438 sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && \ 438 sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp &&
439 rm ${WORKDIR}/bh_installed_pkgs_deps.txt 439 rm ${WORKDIR}/bh_installed_pkgs_deps.txt
440 # Change delimiter from pipe to -> and set style for recommend lines 440 # Remove lines with rpmlib(...) and config(...) dependencies, change the
441 sed -i -e 's:|: -> :' -e 's:"\[REC\]":[style=dotted]:' -e 's:$:;:' $1/depends.tmp 441 # delimiter from pipe to "->", set the style for recommend lines and
442 # turn versioned dependencies into edge labels.
443 sed -i -e '/rpmlib(/d' \
444 -e '/config(/d' \
445 -e 's:|: -> :' \
446 -e 's:"\[REC\]":[style=dotted]:' \
447 -e 's:"\([<>=]\+\)" "\([^"]*\)":[label="\1 \2"]:' \
448 $1/depends.tmp
442 # Add header, sorted and de-duped contents and footer and then delete the temp file 449 # Add header, sorted and de-duped contents and footer and then delete the temp file
443 printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot 450 printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot
444 cat $1/depends.tmp | sort | uniq >> $1/depends.dot 451 cat $1/depends.tmp | sort -u >> $1/depends.dot
445 echo "}" >> $1/depends.dot 452 echo "}" >> $1/depends.dot
446 rm $1/depends.tmp 453 rm $1/depends.tmp
447 454