summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjosch <j.schauer@email.de>2015-01-04 12:25:40 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-04 12:27:25 +0100
commit363226564eb73c186fee8416265a0474b3a0ba12 (patch)
tree36155584043a8398a4f25b83252549996d38d4b6 /bin
parent5fef6fa34ce01b8953a22ebde038183fb715e781 (diff)
downloadjenkins.debian.net-363226564eb73c186fee8416265a0474b3a0ba12.tar.xz
bin/find_dpkg_trigger_cycles.sh: pimp the output with a summary
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find_dpkg_trigger_cycles.sh70
1 files changed, 49 insertions, 21 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh
index 526d8964..b201f2c1 100755
--- a/bin/find_dpkg_trigger_cycles.sh
+++ b/bin/find_dpkg_trigger_cycles.sh
@@ -241,26 +241,54 @@ cat interested-explicit | while read pkg ttype iname; do
done
echo "+----------------------------------------------------------+"
-echo "| file based trigger cycles |"
+echo "| result summary |"
echo "+----------------------------------------------------------+"
echo ""
-echo "# Associates binary packages with other binary packages they can form a file"
-echo "# trigger cycle with. The first column is the binary package containing the file"
-echo "# trigger, the second column is the file trigger, the third column is a binary"
-echo "# package providing a path that triggers the binary package in the first column,"
-echo "# the fourth column is the triggering path of provided by the binary package in"
-echo "# the third column."
-echo ""
-cat result-file
-echo ""
-echo ""
-echo "+----------------------------------------------------------+"
-echo "| explicit trigger cycles |"
-echo "+----------------------------------------------------------+"
-echo ""
-echo "# Associates binary packages with other binary packages they can form an explicit"
-echo "# trigger cycle with. The first column is the binary package interested in the"
-echo "# explicit trigger, the second column is the name of the explicit trigger, the"
-echo "# third column is the binary package activating the trigger."
-echo ""
-cat result-explicit
+echo "number of found file based trigger cycles:"
+wc -l result-file
+if [ `wc -l result-file` != 0 ]; then
+ echo "Warning: found file based trigger cycles"
+ echo "number of packages creating file based trigger cycles:"
+ awk '{ print $1 }' result-file | sort | uniq | wc -l
+ echo "unique packages creating file based trigger cycles:"
+ awk '{ print $1 }' result-file | sort | uniq
+fi
+echo "number of found explicit trigger cycles:"
+wc -l result-explicit
+if [ `wc -l result-explicit` != 0 ]; then
+ echo "Warning: found explicit trigger cycles"
+ echo "number of packages creating explicit trigger cycles:"
+ awk '{ print $1 }' result-explicit | sort | uniq | wc -l
+ echo "unique packages creating explicit trigger cycles:"
+ awk '{ print $1 }' result-explicit | sort | uniq
+fi
+if [ `wc -l result-file` != 0 ]; then
+ echo ""
+ echo ""
+ echo "+----------------------------------------------------------+"
+ echo "| file based trigger cycles |"
+ echo "+----------------------------------------------------------+"
+ echo ""
+ echo "# Associates binary packages with other binary packages they can form a file"
+ echo "# trigger cycle with. The first column is the binary package containing the file"
+ echo "# trigger, the second column is the file trigger, the third column is a binary"
+ echo "# package providing a path that triggers the binary package in the first column,"
+ echo "# the fourth column is the triggering path of provided by the binary package in"
+ echo "# the third column."
+ echo ""
+ cat result-file
+fi
+if [ `wc -l result-explicit` != 0 ]; then
+ echo ""
+ echo ""
+ echo "+----------------------------------------------------------+"
+ echo "| explicit trigger cycles |"
+ echo "+----------------------------------------------------------+"
+ echo ""
+ echo "# Associates binary packages with other binary packages they can form an explicit"
+ echo "# trigger cycle with. The first column is the binary package interested in the"
+ echo "# explicit trigger, the second column is the name of the explicit trigger, the"
+ echo "# third column is the binary package activating the trigger."
+ echo ""
+ cat result-explicit
+fi