Commits on Source (10)
-
Caleb Connolly authored
Make intellisense happy Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
make mypy happy Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Lazy load pmb.config.styles and move the pmb.__version__ print elsewhere so the logging module is (closer to) a standalone entity. This is necessary to be able to import it in pmb/helpers/apk.py otherwise we get a cyclical dependency. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
This function better belongs here, especially as it will be used outside of the context of a chroot() soon. Additionally, it's adjusted to take the rootfs path as its first argument rather than a chroot, since it could operate on any rootfs. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
In 0b4fb911 (chroot: always run apk static v2 (MR 2423)) we adjusted install_run_apk() to run apk static on the host and pass in the local binary repo with "--repository". This function can call apk in two ways, either with the progress bar handling or without, the second case was never updated and still ran apk inside the chroot incorrectly and with an incorrect --repository flag. Let's finish the job by refactoring helpers/apk.py to support all our usecases and pointing everything to it, removing the last few situations where we call "pmb.chroot.root(["apk", ...]). The apk_with_progress() function is replaced by a generic "run()" function which takes a boolean to indicate if we should render apk progress. Additionally, a new cache_clean() function is added so that "pmbootstrap zap --pkgs-online-mismatch" can FINALLY be refactored to not rely on a chroot existing. This requires some hacks but nothing serious, see the comments in the function for details. The chroot.init() code is now simplified since handling the --root, --arch, --cache-dir, and --repository flags is now all done by apk._prepare_cmd() as and when appropriate. Lastly, this fixes a (previously unnoticed) bug where apk.static was actually using /var/cache/apk on your host machine for its cache... This is definitely not good behaviour.... Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Since all apk invocations withing pmbootstrap now use apk.static by default, apk_static.run() isn't called anymore, so let's remove it. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Move the apk_static module from pmb/chroot to pmb/helpers which is a more suitable location. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Since parse.deviceinfo() returns a custom class now, it can't be trivially serialized as JSON. This has been broken for months now so it's clear nobody is using this. Let's take the chance to get rid of it. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
When running "apk add" we must always have --cache-dir set! We also expect --no-interactive to be set. Add some asserts so we don't regress here. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
This was always a hack, and it looks like there (hopefully) aren't any placs where we still need to handle this. Possibly expecting regressions... But then we have something to write a test for. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
Showing
- docs/api/pmb.chroot.rst 0 additions, 8 deletionsdocs/api/pmb.chroot.rst
- docs/api/pmb.helpers.rst 8 additions, 0 deletionsdocs/api/pmb.helpers.rst
- pmb/__init__.py 0 additions, 1 deletionpmb/__init__.py
- pmb/aportgen/busybox_static.py 0 additions, 1 deletionpmb/aportgen/busybox_static.py
- pmb/aportgen/grub_efi.py 0 additions, 1 deletionpmb/aportgen/grub_efi.py
- pmb/aportgen/musl.py 0 additions, 1 deletionpmb/aportgen/musl.py
- pmb/chroot/apk.py 6 additions, 68 deletionspmb/chroot/apk.py
- pmb/chroot/init.py 9 additions, 13 deletionspmb/chroot/init.py
- pmb/chroot/initfs_hooks.py 1 addition, 1 deletionpmb/chroot/initfs_hooks.py
- pmb/chroot/zap.py 4 additions, 15 deletionspmb/chroot/zap.py
- pmb/commands/__init__.py 0 additions, 1 deletionpmb/commands/__init__.py
- pmb/commands/repo_bootstrap.py 6 additions, 6 deletionspmb/commands/repo_bootstrap.py
- pmb/config/__init__.py 1 addition, 0 deletionspmb/config/__init__.py
- pmb/helpers/apk.py 192 additions, 12 deletionspmb/helpers/apk.py
- pmb/helpers/apk_static.py 2 additions, 11 deletionspmb/helpers/apk_static.py
- pmb/helpers/args.py 3 additions, 0 deletionspmb/helpers/args.py
- pmb/helpers/frontend.py 1 addition, 14 deletionspmb/helpers/frontend.py
- pmb/helpers/logging.py 7 additions, 3 deletionspmb/helpers/logging.py
- pmb/helpers/repo.py 10 additions, 3 deletionspmb/helpers/repo.py
- pmb/helpers/run.py 2 additions, 8 deletionspmb/helpers/run.py