From 353dc3f7681f874b2d04be973dfacb2cc439b530 Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Sat, 12 Aug 2023 16:37:05 +0100 Subject: [PATCH] Updated transaction.py When computing, the package is added to the final state. Added more logging statements Fixed bugs for annotations --- soypak/deps/transaction.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/soypak/deps/transaction.py b/soypak/deps/transaction.py index 6193b57..03db11f 100644 --- a/soypak/deps/transaction.py +++ b/soypak/deps/transaction.py @@ -22,12 +22,13 @@ class Transaction: self.pkg_goal: PkgGoal = goal - def compute(self, pkgs: list[bottler._Soybottle]) -> tuple: + def compute(self, pkgs: list[bottler.PackageItem]) -> tuple: """Compute dependencies and conflicts of packages. Returns a list of total packages to install.""" self._final_state = [] sys_depends = [] for pkg in pkgs: - ... + # add the package itself to the final state since it can be installed + self._final_state.append(pkg) # :@TODO: compute the dependencies return tuple(sys_depends) @@ -35,7 +36,7 @@ class Transaction: def apply(self): if self.pkg_goal == PkgGoal.PKG_INSTALL: - ops.install_packages(self._final_state) + ops.install_packages(self, self._final_state) def problems(self) -> tuple: