From efe3ea015c1fc2029c1be367c3169249f3deb2f1 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Sun, 7 Jan 2024 20:45:15 -0700 Subject: [PATCH] main: fix type errors --- acbs/base.py | 1 + acbs/main.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/acbs/base.py b/acbs/base.py index 02c152e..4b342e5 100644 --- a/acbs/base.py +++ b/acbs/base.py @@ -50,6 +50,7 @@ def __init__(self, name: str, deps: List[str], location: str, source_uri: List[A # modifiers to be applied to the source file/folder (only available in autobuild4) self.modifiers: str = '' + @staticmethod def is_in_stage2(modifiers: str) -> bool: return '+stage2' in modifiers.lower() diff --git a/acbs/main.py b/acbs/main.py index dd29ee2..bf7c6bb 100644 --- a/acbs/main.py +++ b/acbs/main.py @@ -112,7 +112,7 @@ def build(self) -> None: logging.info('Searching and resolving dependencies...') acbs.pm.reorder_mode = self.reorder for n, i in enumerate(self.build_queue): - i, modifiers = self.set_modifiers(i) + i, modifiers = self.strip_modifiers(i) if not validate_package_name(i): raise ValueError(f'Invalid package name: `{i}`') logging.debug(f'Finding {i}...') @@ -267,7 +267,7 @@ def build_sequential(self, build_timings, packages: List[ACBSPackageInfo]): start = time.monotonic() task_name = f'{task.name} ({task.bin_arch} @ {task.epoch + ":" if task.epoch else ""}{task.version}-{task.rel})' try: - scoped_stage2 = ACBSPackageInfo.is_in_stage2(task.modifiers) | stage2 + scoped_stage2 = ACBSPackageInfo.is_in_stage2(task.modifiers) | self.stage2 invoke_autobuild(task, build_dir, scoped_stage2) check_artifact(task.name, build_dir) except Exception: