pmbootstrap/pmb
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
..
aportgen pmb.aportgen.gcc: use more f-strings (MR 2092) 2021-08-10 01:18:22 +03:00
build pmbootstrap lint: avoid looping and copying files (MR 2100) 2021-09-03 10:52:50 -07:00
chroot chroot/other/kernel_flavor_installed: support generic kernel name (MR 2093) 2021-09-02 18:18:13 -07:00
config Prepare 1.37.0 release 2021-09-03 19:28:07 +02:00
data pmb/data/keys/pmos-5a03a13a.rsa.pub: remove (!1835) 2019-11-21 23:52:25 +01:00
export pmb/export/symlinks: add support for a single 'flavor' (MR 2093) 2021-09-02 18:18:13 -07:00
flasher pmb/config/flashers: add support for single kernel 'flavor' (MR 2093) 2021-09-02 18:18:13 -07:00
helpers pmbootstrap lint: avoid looping and copying files (MR 2100) 2021-09-03 10:52:50 -07:00
install pmb/install/recovery: add support for single kernel 'flavor' (MR 2093) 2021-09-02 18:18:13 -07:00
parse pmb/helpers/frontend: drop all --flavors args (MR 2093) 2021-09-02 18:18:13 -07:00
qemu pmb/qemu: add support for single kernel 'flavor' (MR 2093) 2021-09-02 18:18:14 -07:00
sideload pmb.sideload: support non-standard SSH port (!2046) 2021-04-25 21:04:49 +03:00
__init__.py pmbootstrap: make use of consistent casing (MR 2090) 2021-08-12 17:06:11 +02:00