diff --git a/docs/api/pmb.chroot.rst b/docs/api/pmb.chroot.rst index 72251e06..0d3df867 100644 --- a/docs/api/pmb.chroot.rst +++ b/docs/api/pmb.chroot.rst @@ -12,14 +12,6 @@ pmb.chroot.apk module :undoc-members: :show-inheritance: -pmb.chroot.apk\_static module ------------------------------ - -.. automodule:: pmb.chroot.apk_static - :members: - :undoc-members: - :show-inheritance: - pmb.chroot.binfmt module ------------------------ diff --git a/docs/api/pmb.helpers.rst b/docs/api/pmb.helpers.rst index 41bf155e..a6549577 100644 --- a/docs/api/pmb.helpers.rst +++ b/docs/api/pmb.helpers.rst @@ -4,6 +4,14 @@ pmb.helpers package Submodules ---------- +pmb.helpers.apk\_static module +----------------------------- + +.. automodule:: pmb.helpers.apk_static + :members: + :undoc-members: + :show-inheritance: + pmb.helpers.apk module ---------------------- diff --git a/pmb/__init__.py b/pmb/__init__.py index 4c93efa3..6e2530e1 100644 --- a/pmb/__init__.py +++ b/pmb/__init__.py @@ -14,7 +14,6 @@ if TYPE_CHECKING: from . import config from . import parse -from . import types from .config import init as config_init from .helpers import frontend from .helpers import logging diff --git a/pmb/aportgen/busybox_static.py b/pmb/aportgen/busybox_static.py index 932c953a..8a2bdbda 100644 --- a/pmb/aportgen/busybox_static.py +++ b/pmb/aportgen/busybox_static.py @@ -4,7 +4,6 @@ from pathlib import Path import pmb.aportgen.core import pmb.build import pmb.chroot.apk -import pmb.chroot.apk_static import pmb.helpers.run import pmb.parse.apkindex from pmb.core import Chroot diff --git a/pmb/aportgen/grub_efi.py b/pmb/aportgen/grub_efi.py index 33fd601f..5e0605e3 100644 --- a/pmb/aportgen/grub_efi.py +++ b/pmb/aportgen/grub_efi.py @@ -4,7 +4,6 @@ from pathlib import Path import pmb.aportgen.core import pmb.build import pmb.chroot.apk -import pmb.chroot.apk_static from pmb.core.arch import Arch import pmb.helpers.run import pmb.parse.apkindex diff --git a/pmb/aportgen/musl.py b/pmb/aportgen/musl.py index 094785d2..0d0e941d 100644 --- a/pmb/aportgen/musl.py +++ b/pmb/aportgen/musl.py @@ -4,7 +4,6 @@ from pathlib import Path import pmb.aportgen.core import pmb.build import pmb.chroot.apk -import pmb.chroot.apk_static import pmb.helpers.run import pmb.parse.apkindex from pmb.core import Chroot diff --git a/pmb/chroot/apk.py b/pmb/chroot/apk.py index bc2b6ddb..34188714 100644 --- a/pmb/chroot/apk.py +++ b/pmb/chroot/apk.py @@ -6,7 +6,6 @@ from __future__ import annotations import os from pathlib import Path import traceback -import pmb.chroot.apk_static from pmb.core.arch import Arch from pmb.helpers import logging from collections.abc import Sequence diff --git a/pmb/chroot/init.py b/pmb/chroot/init.py index e7f2fd8a..b36c2c27 100644 --- a/pmb/chroot/init.py +++ b/pmb/chroot/init.py @@ -9,9 +9,9 @@ import os import pmb.chroot import pmb.chroot.binfmt import pmb.chroot.apk -import pmb.chroot.apk_static import pmb.config import pmb.config.workdir +import pmb.helpers.apk_static import pmb.helpers.apk import pmb.helpers.repo import pmb.helpers.run @@ -142,8 +142,8 @@ def init(chroot: Chroot, usr_merge: UsrMerge = UsrMerge.AUTO) -> None: warn_if_chroots_outdated() return - # Require apk-tools-static - pmb.chroot.apk_static.init() + # Fetch apk.static + pmb.helpers.apk_static.init() logging.info(f"({chroot}) Creating chroot") diff --git a/pmb/chroot/apk_static.py b/pmb/helpers/apk_static.py similarity index 97% rename from pmb/chroot/apk_static.py rename to pmb/helpers/apk_static.py index 9170b9ac..763f045b 100644 --- a/pmb/chroot/apk_static.py +++ b/pmb/helpers/apk_static.py @@ -161,7 +161,8 @@ def init() -> None: """ Download, verify, extract $WORK/apk.static. """ - # Get and parse the APKINDEX + # Get and parse the APKINDEX. alpine_apkindex_path() will implicitly + # download the APKINDEX file if it's missing. apkindex = pmb.helpers.repo.alpine_apkindex_path("main") index_data = pmb.parse.apkindex.package("apk-tools-static", indexes=[apkindex])