From 256db411dbe4e01fedeac43649a82c28071c9be5 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 17 Oct 2014 15:34:12 +0200 Subject: [PATCH] pkg-stats: add statistics about hash files As discussed during the Buildroot meeting, this commit extends the pkg-stats script to include statistics about the number of packages having vs. not having the hash file. As of today, we have 104 packages with the hash file, and 1274 packages without. Signed-off-by: Thomas Petazzoni --- support/scripts/pkg-stats | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index f5d6ec8df5..f6d10bb597 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -67,6 +67,7 @@ td.lotsofpatches { Infrastructure License License files +Hash file " @@ -82,6 +83,8 @@ packages_with_licence=0 packages_without_licence=0 packages_with_license_files=0 packages_without_license_files=0 +packages_with_hash_file=0 +packages_without_hash_file=0 total_patch_count=0 cnt=0 @@ -191,6 +194,7 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do fi pkg=$(basename $i) + dir=$(dirname $i) pkg=${pkg%.mk} pkgvariable=$(echo ${pkg} | tr "a-z-" "A-Z_") @@ -231,6 +235,14 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do license_files=0 fi + if test -f ${dir}/${pkg}.hash; then + packages_with_hash_file=$(($packages_with_hash_file+1)) + hash_file=1 + else + packages_without_hash_file=$(($packages_without_hash_file+1)) + hash_file=0 + fi + echo "" echo "$cnt" @@ -279,6 +291,12 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do echo "Yes" fi + if [ ${hash_file} -eq 0 ] ; then + echo "No" + else + echo "Yes" + fi + echo "" done @@ -335,6 +353,14 @@ echo "Packages not having licence files information" echo "$packages_without_license_files" echo "" echo "" +echo "Packages having hash file" +echo "$packages_with_hash_file" +echo "" +echo "" +echo "Packages not having hash file" +echo "$packages_without_hash_file" +echo "" +echo "" echo "Number of patches in all packages" echo "$total_patch_count" echo "" -- 2.30.2