kumquat-buildroot/support
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
..
config-fragments toolchain-configs.csv: re-organize for test-pkg 2018-04-01 16:30:30 +02:00
dependencies check-host-tar.sh: bump minimum tar version to 1.27 for reproducible tar files with long paths 2018-04-02 14:46:52 +02:00
docker support/dockerfile: install flake8 2018-03-13 22:32:36 +01:00
download core/download: fix when the BR2_DL_DIR does not accept hardlinks 2018-04-03 22:45:00 +02:00
gnuconfig support/gnuconfig: bump version to 2016-05-15 2016-06-05 22:26:57 +02:00
kconfig merge_config.sh: add br2-external support 2018-01-29 14:54:42 +01:00
legal-info legal-info: add hash for our own license file 2017-07-05 16:31:40 +02:00
libtool support/libtool: add patch for newer versions 2014-12-21 13:21:56 +01:00
misc Update for 2018.02 2018-03-04 22:28:34 +01:00
scripts support/scripts/pkg-stats-new: rewrite in Python 2018-04-04 22:01:55 +02:00
testing testing/infra/builder: split configure() from build() 2018-04-01 19:59:36 +02:00