1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-12 19:09:56 +03:00

helpers: apk_static: move from pmb.chroot (MR 2463)

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>
This commit is contained in:
Caleb Connolly 2024-10-28 00:16:42 +01:00
parent c4a92c37a8
commit 26ec1631ca
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
9 changed files with 13 additions and 17 deletions

View file

@ -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
------------------------

View file

@ -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
----------------------

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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")

View file

@ -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])