summaryrefslogtreecommitdiffstats
path: root/package/postgresql/postgresql.service
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-03-23 21:54:51 +0100
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-04 22:01:55 +0200
commitef63a330b4f156e7e05f7ebe41f33a882cc69d01 (patch)
tree9cd529005d8b3ab42bf4df6ce92da6583337abe5 /package/postgresql/postgresql.service
parentf9ca8fa8ddd71109882f21b1bc232d564dec9887 (diff)
downloadbuildroot-ef63a330b4f156e7e05f7ebe41f33a882cc69d01.tar.gz
buildroot-ef63a330b4f156e7e05f7ebe41f33a882cc69d01.zip
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>
Diffstat (limited to 'package/postgresql/postgresql.service')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud