mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-26 18:19:30 +00:00
fix: remove packages with broken dependencies from build plan and mark
them as failed
This commit is contained in:
1 parent
22c763ed52
commit
71c5d58264
4 files changed
+42
-15
No files matched your search
@@ -170,6 +170,8 @@ class Application(ApplicationPackages, ApplicationRepository):
|
||||
packages = new_packages(package)
|
||||
except Exception:
|
||||
self.logger.exception("could not process dependencies of %s, skip the package", package.base)
|
||||
plan.remove(package.base)
|
||||
self.reporter.set_failed(package.base)
|
||||
continue
|
||||
|
||||
# update existing package
|
||||
|
||||
@@ -125,6 +125,15 @@ class BuildPlan(Iterable[Package]):
|
||||
"""
|
||||
return self._items[package_base]
|
||||
|
||||
def remove(self, package_base: str) -> None:
|
||||
"""
|
||||
remove a package from the plan
|
||||
|
||||
Args:
|
||||
package_base(str): package base to remove
|
||||
"""
|
||||
del self._items[package_base]
|
||||
|
||||
def update(self, packages: Iterable[Package], reason: BuildPlanReason = BuildPlanReason.MANUAL_REQUEST,
|
||||
requester: str | None = None) -> Self:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user