diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-08-29 23:21:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 17:57:11 +0100 |
commit | e56ff209315e668880dbcbc4aa8241c33d434cae (patch) | |
tree | 4a5e05759ec0e6a2d963ec7143bd1576bbe35e8a /meta/classes/buildhistory.bbclass | |
parent | b539afa655ba78a7ca1987ae146d4ca72fd9140f (diff) | |
download | poky-e56ff209315e668880dbcbc4aa8241c33d434cae.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: 99ef2f26cf498e1693a947bb44e40c31c20ec525)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 8eafdc9f72..3823c664ab 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -446,13 +446,20 @@ buildhistory_get_installed() { | |||
446 | 446 | ||
447 | # Produce dependency graph | 447 | # Produce dependency graph |
448 | # First, quote each name to handle characters that cause issues for dot | 448 | # First, quote each name to handle characters that cause issues for dot |
449 | sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && \ | 449 | sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && |
450 | rm ${WORKDIR}/bh_installed_pkgs_deps.txt | 450 | rm ${WORKDIR}/bh_installed_pkgs_deps.txt |
451 | # Change delimiter from pipe to -> and set style for recommend lines | 451 | # Remove lines with rpmlib(...) and config(...) dependencies, change the |
452 | sed -i -e 's:|: -> :' -e 's:"\[REC\]":[style=dotted]:' -e 's:$:;:' $1/depends.tmp | 452 | # delimiter from pipe to "->", set the style for recommend lines and |
453 | # turn versioned dependencies into edge labels. | ||
454 | sed -i -e '/rpmlib(/d' \ | ||
455 | -e '/config(/d' \ | ||
456 | -e 's:|: -> :' \ | ||
457 | -e 's:"\[REC\]":[style=dotted]:' \ | ||
458 | -e 's:"\([<>=]\+\)" "\([^"]*\)":[label="\1 \2"]:' \ | ||
459 | $1/depends.tmp | ||
453 | # Add header, sorted and de-duped contents and footer and then delete the temp file | 460 | # Add header, sorted and de-duped contents and footer and then delete the temp file |
454 | printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot | 461 | printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot |
455 | cat $1/depends.tmp | sort | uniq >> $1/depends.dot | 462 | cat $1/depends.tmp | sort -u >> $1/depends.dot |
456 | echo "}" >> $1/depends.dot | 463 | echo "}" >> $1/depends.dot |
457 | rm $1/depends.tmp | 464 | rm $1/depends.tmp |
458 | 465 | ||