From 58dbdce29eaacd8a7d5bbc2eb6eebcd29efa7052 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 5 Aug 2012 11:50:10 +0200 Subject: [PATCH] pkg-stats: statistics about license files information Since on some packages we are adding _LICENSE but not necessarily _LICENSE_FILES, let's add a separate statistic to track these informations. This will allow us to improve both the number of packages covered by _LICENSE and _LICENSE_FILES. Signed-off-by: Thomas Petazzoni --- support/scripts/pkg-stats | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index a07af555e9..9c8ec492c1 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -66,6 +66,7 @@ td.lotsofpatches { Patch count Infrastructure License +License files " @@ -75,6 +76,8 @@ generic_packages=0 manual_packages=0 packages_with_licence=0 packages_without_licence=0 +packages_with_license_files=0 +packages_without_license_files=0 total_patch_count=0 cnt=0 @@ -163,6 +166,14 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do license=0 fi + if grep -qE "^${pkgvariable}_LICENSE_FILES[ ]*=" $i ; then + packages_with_license_files=$(($packages_with_license_files+1)) + license_files=1 + else + packages_without_license_files=$(($packages_without_license_files+1)) + license_files=0 + fi + echo "" echo "$cnt" @@ -205,6 +216,12 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do echo "Yes" fi + if [ ${license_files} -eq 0 ] ; then + echo "No" + else + echo "Yes" + fi + echo "" done @@ -236,6 +253,14 @@ echo "Packages not having licence information" echo "$packages_without_license" echo "" echo "" +echo "Packages having license files information" +echo "$packages_with_license_files" +echo "" +echo "" +echo "Packages not having licence files information" +echo "$packages_without_license_files" +echo "" +echo "" echo "Number of patches in all packages" echo "$total_patch_count" echo "" -- 2.30.2