pkg-stats: take into account waf packages
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Jul 2017 19:45:41 +0000 (21:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Jul 2017 19:45:41 +0000 (21:45 +0200)
The waf package infrastructure was not known by the pkg-stats script,
so let's add it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/pkg-stats

index 95a8afc45e8a2bcbfb9cb521587c272e77ed4b33..eb4871142f0a6104d40a73f80e5c80dd83cd5b49 100755 (executable)
@@ -84,6 +84,7 @@ python_packages=0
 rebar_packages=0
 virtual_packages=0
 generic_packages=0
+waf_packages=0
 manual_packages=0
 packages_with_licence=0
 packages_without_licence=0
@@ -231,6 +232,11 @@ for i in $(find boot/ linux/ package/ toolchain/ -name '*.mk' | sort) ; do
        hastarget=1
     fi
 
+    if grep -E "\(waf-package\)" $i > /dev/null ; then
+       infratype="waf"
+       hastarget=1
+    fi
+
     pkg=$(basename $i)
     dir=$(dirname $i)
     pkg=${pkg%.mk}
@@ -259,6 +265,8 @@ for i in $(find boot/ linux/ package/ toolchain/ -name '*.mk' | sort) ; do
        virtual_packages=$(($virtual_packages+1))
     elif [ ${infratype} = "generic" ]; then
        generic_packages=$(($generic_packages+1))
+    elif [ ${infratype} = "waf" ]; then
+       waf_packages=$(($waf_packages+1))
     fi
 
     if grep -qE "^${pkgvariable}_LICENSE[ ]*=" $i ; then
@@ -391,6 +399,10 @@ echo "<td>Packages using the <i>virtual</i> infrastructure</td>"
 echo "<td>$virtual_packages</td>"
 echo "</tr>"
 echo "<tr>"
+echo "<td>Packages using the <i>waf</i> infrastructure</td>"
+echo "<td>$waf_packages</td>"
+echo "</tr>"
+echo "<tr>"
 echo "<td>Packages not using any infrastructure</td>"
 echo "<td>$manual_packages</td>"
 echo "</tr>"