pmbootstrap-meow/pmb/helpers
Caleb Connolly 3034768a1a
chroot: apk: fix local repos with apk.static (MR 2252)
It turns out that apk with the --root argument will still treat local
repositories relative to the host. This makes sense considering the
intended usecase, however as a result the recent change to use
apk.static for all apk commands inside the target root will break the
use of local packages.

To fix this, adjust how we populate /etc/apk/repositories, changing the
default to no longer include the local user repo. Instead we pass
--repository to apk.static with the host path to the repo.

The only time we want to add the user repo to /etc/apk/repositories
inside the chroot is when the user enters the chroot, so a special case
is added to helpers/frontend.py for the chroot command.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00
..
__init__.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
apk.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
aportupgrade.py helpers: aportupgrade: fix req_headers init (MR 2252) 2024-06-23 12:38:40 +02:00
args.py helpers: logging: get rid of context and args (MR 2252) 2024-06-23 12:38:41 +02:00
cli.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
devices.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
exceptions.py pmb.helpers.exceptions: Add BuildFailedError (MR 2288) 2024-04-10 20:49:07 +00:00
file.py meta: cache: rework cache clear (MR 2252) 2024-06-23 12:38:41 +02:00
frontend.py chroot: apk: fix local repos with apk.static (MR 2252) 2024-06-23 12:38:41 +02:00
git.py tests: basic pkgrepo tests, clone pmaports (MR 2252) 2024-06-23 12:38:41 +02:00
http.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
lint.py make mypy happy (MR 2252) 2024-06-23 12:38:41 +02:00
logging.py helpers: logging: fixes + details_to_stdout in color (MR 2252) 2024-06-23 12:38:41 +02:00
mount.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
other.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
package.py helpers: package: fix potential null access in check_arch() (MR 2252) 2024-06-23 12:38:40 +02:00
pkgrel_bump.py repo: use new config.mirrors (MR 2252) 2024-06-23 12:38:39 +02:00
pmaports.py make mypy happy (MR 2252) 2024-06-23 12:38:41 +02:00
repo.py chroot: apk: fix local repos with apk.static (MR 2252) 2024-06-23 12:38:41 +02:00
repo_missing.py build: package: more dependency resolution fixes (MR 2252) 2024-06-23 12:38:41 +02:00
run.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
run_core.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
status.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00
ui.py ruff: run check --fix (MR 2252) 2024-06-23 12:38:41 +02:00