kumquat-buildroot/support/scripts
Thomas Petazzoni ef63a330b4 support/scripts/pkg-stats-new: rewrite in Python
This commit adds a new version of the pkg-stats script, rewritten in
Python. It is for now implemented in a separate file called,
pkg-stats-new, in order to make the diff easily readable. A future
commit will rename it to pkg-stats.

Compared to the existing shell-based pkg-stats script, the
functionality and output is basically the same. The main difference is
that the output no longer goes to stdout, but to the file passed as
argument using the -o option. This allows stdout to be used for more
debugging related information.

The way the script works is that a first function get_pkglist()
returns a list of Package objects. Then, the function
package_init_make_info() uses 'make printvars' to gather information
about all packages, stored as class variables in the Package
class. Then, we iterate over all packages, and use various methods of
the Package class to retrieve all details about the package:
infrastructure, presence of hash file, presence of license
information, etc.

calculate_stats() then calculates global statistics (how packages have
license information, how packages have a hash file, etc.). Finally,
dump_html() produces the HTML output, using a number of sub-functions.

One improvement over the shell-based version is that we can use
regexps to exclude some .mk files. Thanks to this, we can exclude all
linux-ext-*.mk files, avoiding incorrect matches.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
2018-04-04 22:01:55 +02:00
..
apply-patches.sh support/scripts/apply-patches.sh: do not apply patches with renames 2017-09-19 22:51:25 +02:00
br2-external support/scripts: fix shebang with bash 2017-06-08 21:43:05 +02:00
brpkgutil.py support/scripts/graph-depends: use the standard python logging module 2018-04-01 22:25:57 +02:00
check-bin-arch support/check-bin-arch: exclude kernel modules for merged /usr 2018-03-07 23:03:52 +01:00
check-host-rpath support/check-rpath: recognise PIE 2017-09-27 00:13:55 +02:00
check-kernel-headers.sh check-kernel-headers: mktemp --tmpdir not available on RedHat RHEL5 2014-09-28 20:40:57 +02:00
check-uniq-files support/check-uniq-files: support weird locales and filenames 2018-03-31 15:32:00 +02:00
eclipse-register-toolchain eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usr 2017-07-05 16:06:27 +02:00
expunge-gconv-modules Change /bin/bash shebangs into /usr/bin/env bash 2014-10-25 01:55:37 +02:00
fix-configure-powerpc64.sh support/scripts: fix shebang with bash 2017-06-08 21:43:05 +02:00
fix-rpath support/scripts/fix-rpath: typo fix and unneeded "; " removed 2017-07-22 14:38:43 +02:00
genimage.sh support/scripts/genimage.sh: show usage when invoked incorrectly 2017-12-11 20:14:39 +01:00
graph-build-time graph-build-time: fix code style 2018-01-29 23:14:24 +01:00
graph-depends support/scripts/graph-depends: add --flat-list option 2018-04-01 22:25:57 +02:00
hardlink-or-copy support/scripts: fix shebang with bash 2017-06-08 21:43:05 +02:00
mkmakefile Makefile: Remove 'quiet' variable 2015-10-29 00:04:05 +01:00
mkusers support/scripts: allow /etc/shadow to be symlinked 2017-06-24 17:49:48 +02:00
pkg-stats pkg-stats: add exception for nvidia-tegra23.mk 2017-07-06 21:46:04 +02:00
pkg-stats-new support/scripts/pkg-stats-new: rewrite in Python 2018-04-04 22:01:55 +02:00
pycompile.py pycompile: fix code style 2018-01-29 23:14:24 +01:00
setlocalversion setlocalversion: fix detection of hg revision for untagged versions 2017-07-03 11:40:49 +02:00
size-stats size-stats: fix code style 2018-01-29 23:14:24 +01:00
xorg-release support/scripts: fix shebang with python 2017-06-07 21:55:10 +02:00