mirror of https://github.com/Chizi123/Arch-autobuild-repo.git

Joel Grunbaum
yesterday 644280c8d9e4245f235a5f844809d3fc79ab3155
src/archbuild/builder.py
@@ -158,9 +158,13 @@
    async def __aenter__(self) -> "Builder":
        """Async context manager entry."""
        max_workers = self.config.building.max_workers if self.config.building.parallel else 1
        self._executor = ProcessPoolExecutor(max_workers=max_workers)
        logger.info(f"Builder initialized with {max_workers} workers")
        if self.config.building.parallel:
            max_workers = self.config.building.max_workers
            self._executor = ProcessPoolExecutor(max_workers=max_workers)
            logger.info(f"Builder initialized with {max_workers} workers (parallel)")
        else:
            self._executor = None
            logger.info("Builder initialized (sequential)")
        return self
    async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
@@ -417,6 +421,13 @@
        # Resolve dependencies
        build_order = await self.resolver.resolve([package])
        if package not in build_order.packages:
            logger.info(f"Package {package} does not need to be built")
            return BuildResult(
                package=package,
                status=BuildStatus.SKIPPED,
            )
        # Build dependencies first
        results: list[BuildResult] = []
        for dep in build_order: