Get rid of /app hardcodes

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
InsanePrawn 2021-09-30 17:18:32 +02:00
parent 0e21f9060d
commit 482c5f8111
6 changed files with 7 additions and 7 deletions

1
blergh
View file

@ -1 +0,0 @@
123

View file

@ -14,7 +14,7 @@ def create_chroot(
chroot_name,
arch='aarch64',
packages=['base'],
pacman_conf='/app/local/etc/pacman.conf',
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
extra_repos: dict[str, RepoInfo] = {},
chroot_base_path: str = None,
):

View file

@ -47,6 +47,7 @@ CONFIG_RUNTIME_DEFAULTS = {
'config_file': None,
'arch': None,
'no_wrap': False,
'script_source_dir': os.path.dirname(os.path.realpath(__file__))
}

View file

@ -168,7 +168,7 @@ def cmd_build():
create_chroot(
chroot_name,
packages=packages,
pacman_conf='/app/local/etc/pacman.conf',
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
extra_repos=extra_repos,
)
create_chroot_user(chroot_name, user=profile['username'], password=profile['password'])

View file

@ -17,12 +17,12 @@ makepkg_env = os.environ.copy() | {
'MAKEFLAGS': f"-j{multiprocessing.cpu_count() if config.file['build']['threads'] < 1 else config.file['build']['threads']}",
}
makepkg_cross_env = makepkg_env | {'PACMAN': '/app/local/bin/pacman_aarch64'}
makepkg_cross_env = makepkg_env | {'PACMAN': os.path.join(config.runtime['script_source_dir'], '/local/bin/pacman_aarch64')}
makepkg_cmd = [
'makepkg',
'--config',
'/app/local/etc/makepkg.conf',
os.path.join(config.runtime['script_source_dir'], 'local/etc/makepkg.conf'),
'--noconfirm',
'--ignorearch',
'--needed',
@ -301,7 +301,7 @@ def setup_build_chroot(arch='aarch64', extra_packages=[]) -> str:
chroot_path = create_chroot(
chroot_name,
packages=['base-devel', 'git'] + extra_packages,
pacman_conf='/app/local/etc/pacman.conf',
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
extra_repos=get_kupfer_local(arch).repos,
)

View file

@ -49,7 +49,7 @@ def wrap_docker():
results.append(arg)
return results
script_path = os.path.dirname(os.path.realpath(__file__))
script_path = config.runtime['script_source_dir']
with open(os.path.join(script_path, 'version.txt')) as version_file:
version = version_file.read().replace('\n', '')
tag = f'registry.gitlab.com/kupfer/kupferbootstrap:{version}'