pmbootstrap-meow/pmb/core/context.py
Caleb Connolly 1be8653935
drop args from helpers.git and chroot.apk (MR 2252)
be gone!

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:38 +02:00

30 lines
744 B
Python

# Copyright 2024 Caleb Connolly
# SPDX-License-Identifier: GPL-3.0-or-later
"""Global runtime context"""
from typing import Optional
import pmb.config
from pathlib import Path
class Context():
details_to_stdout: bool
quiet: bool
command_timeout: float
sudo_timer: bool
log: Path
# The architecture of the selected device
device_arch: Optional[str]
offline: bool
aports: Path
def __init__(self):
self.details_to_stdout = False
self.command_timeout = 0
self.sudo_timer = False
self.log = pmb.config.work / "log.txt"
self.quiet = False
self.device_arch = None
self.offline = False
self.aports = pmb.config.work / "cache_git" / "pmaports"