forked from Mirror/pmbootstrap
drop args from helpers.git and chroot.apk (MR 2252)
be gone! Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
52338c5e76
commit
1be8653935
17 changed files with 85 additions and 70 deletions
|
@ -1,6 +1,7 @@
|
|||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import copy
|
||||
import os
|
||||
from pathlib import Path
|
||||
import pmb.config
|
||||
from pmb.core.types import PmbArgs
|
||||
|
@ -120,17 +121,14 @@ def init(args: PmbArgs) -> PmbArgs:
|
|||
context.details_to_stdout = args.details_to_stdout
|
||||
context.sudo_timer = args.sudo_timer
|
||||
context.quiet = args.quiet
|
||||
context.offline = args.offline
|
||||
if args.aports:
|
||||
print(f"Using pmaports from: {args.aports}")
|
||||
context.aports = args.aports
|
||||
|
||||
# Initialize logs (we could raise errors below)
|
||||
pmb.helpers.logging.init(args)
|
||||
|
||||
# Remove attributes from args so they don't get used by mistake
|
||||
delattr(args, "timeout")
|
||||
delattr(args, "details_to_stdout")
|
||||
delattr(args, "sudo_timer")
|
||||
delattr(args, "log")
|
||||
delattr(args, "quiet")
|
||||
|
||||
# Initialization code which may raise errors
|
||||
check_pmaports_path(args)
|
||||
if args.action not in ["init", "checksum", "config", "bootimg_analyze", "log",
|
||||
|
@ -140,6 +138,15 @@ def init(args: PmbArgs) -> PmbArgs:
|
|||
pmb.helpers.git.parse_channels_cfg(args)
|
||||
context.device_arch = args.deviceinfo["arch"]
|
||||
|
||||
# Remove attributes from args so they don't get used by mistake
|
||||
delattr(args, "timeout")
|
||||
delattr(args, "details_to_stdout")
|
||||
delattr(args, "sudo_timer")
|
||||
delattr(args, "log")
|
||||
delattr(args, "quiet")
|
||||
delattr(args, "offline")
|
||||
delattr(args, "aports")
|
||||
|
||||
return args
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue