Skip to content

Commit

Permalink
main: fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
liushuyu committed Jan 8, 2024
1 parent 1d6ea0d commit efe3ea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions acbs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions acbs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}...')
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit efe3ea0

Please sign in to comment.