pmbootstrap/pmb/helpers
Johannes Marbach ac4c967e18
pmbootstrap lint: avoid looping and copying files (MR 2100)
Before this commit, package folders were copied into the chroot one by
one in order to run apkbuild-lint on them. This logic is replaced by
mounting pmaports.git into the chroot and using a single apkbuild-lint
invocation to lint the supplied packages.

Both of these changes result in a performance improvement, especially
when linting multiple packages at once.

Before this change:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m5,261s
    user    0m7,046s
    sys     0m1,842s

Using the pmaports.git mount but calling apkbuild-lint in a loop:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m4,089s
    user    0m6,418s
    sys     0m1,219s

After this change:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m3,518s
    user    0m5,968s
    sys     0m0,959s

Additionally, running apkbuild-lint from the pmaports.git mount point
has the benefit that every printed violation contains a nice source
identifier à la "./cross/grub-x86/APKBUILD". This makes it possible to
differentiate between different packages even though only a single
apkbuild-lint invocation is used.

Relates: postmarketOS/pmaports#564
2021-09-03 10:52:50 -07:00
..
__init__.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
apk.py pmb.config.apk_tools_min_version: support branches (MR 2015) 2021-01-27 22:05:25 +01:00
aportupgrade.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
args.py pmbootstrap init: Add mirror choice (MR 2035) 2021-06-27 18:38:01 +02:00
cli.py pmbootstrap: add color support (MR 2090) 2021-08-19 11:00:04 +02:00
devices.py enforce E501 in pmb/helpers (MR 2058) 2021-06-06 19:21:30 +02:00
file.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
frontend.py pmbootstrap lint: avoid looping and copying files (MR 2100) 2021-09-03 10:52:50 -07:00
git.py Replace pmaports channels stable, stable-next (MR 2032) 2021-03-18 18:58:13 +01:00
http.py pmb.helpers.http: add missing parameter doc (MR 2035) 2021-06-27 18:37:57 +02:00
lint.py pmbootstrap lint: avoid looping and copying files (MR 2100) 2021-09-03 10:52:50 -07:00
logging.py pmbootstrap: add color support (MR 2090) 2021-08-19 11:00:04 +02:00
mount.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
other.py pmb.helpers.other.folder_size: use kilobytes (MR 2074) 2021-06-28 02:07:55 +03:00
package.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
pkgrel_bump.py enforce E501 in pmb/helpers (MR 2058) 2021-06-06 19:21:30 +02:00
pmaports.py enforce E501 in pmb/helpers (MR 2058) 2021-06-06 19:21:30 +02:00
repo.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
repo_missing.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
run.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
run_core.py pmb.helpers.run_core.kill_commands: use minimal subset of ps parameters (MR 2074) 2021-06-28 02:07:55 +03:00
status.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
ui.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00