mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
config: add pacman.repo_branch, adjust KUPFER_HTTPS url to include $arch and use repo_branch
This commit is contained in:
parent
933ffd833c
commit
232254948d
3 changed files with 7 additions and 3 deletions
|
@ -6,6 +6,8 @@ import logging
|
|||
from copy import deepcopy
|
||||
from typing import Optional, Union, TypedDict, Any, Mapping
|
||||
|
||||
from constants import DEFAULT_PACKAGE_BRANCH
|
||||
|
||||
CONFIG_DIR = appdirs.user_config_dir('kupfer')
|
||||
CACHE_DIR = appdirs.user_cache_dir('kupfer')
|
||||
|
||||
|
@ -51,10 +53,11 @@ CONFIG_DEFAULTS: dict = {
|
|||
},
|
||||
'pkgbuilds': {
|
||||
'git_repo': 'https://gitlab.com/kupfer/packages/pkgbuilds.git',
|
||||
'git_branch': 'dev',
|
||||
'git_branch': DEFAULT_PACKAGE_BRANCH,
|
||||
},
|
||||
'pacman': {
|
||||
'parallel_downloads': 4,
|
||||
'repo_branch': DEFAULT_PACKAGE_BRANCH,
|
||||
},
|
||||
'paths': {
|
||||
'cache_dir': CACHE_DIR,
|
||||
|
|
|
@ -82,7 +82,8 @@ REPOSITORIES = [
|
|||
'phosh',
|
||||
]
|
||||
|
||||
KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
|
||||
DEFAULT_PACKAGE_BRANCH = 'dev'
|
||||
KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/%branch%/$arch/$repo'
|
||||
|
||||
Arch: TypeAlias = str
|
||||
ARCHES = [
|
||||
|
|
|
@ -56,7 +56,7 @@ def get_kupfer(arch: str, url_template: str) -> Distro:
|
|||
|
||||
|
||||
def get_kupfer_https(arch: str) -> Distro:
|
||||
return get_kupfer(arch, KUPFER_HTTPS)
|
||||
return get_kupfer(arch, KUPFER_HTTPS.replace('%branch%', config.file['pacman']['repo_branch']))
|
||||
|
||||
|
||||
def get_kupfer_local(arch: Optional[str] = None, in_chroot: bool = True) -> Distro:
|
||||
|
|
Loading…
Add table
Reference in a new issue