slpkg upgrade fails when a package is blacklisted #149

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-11-13 17:12:53 +02:00
parent acc8775d0c
commit f551ea8f52
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,7 @@
4.2.9 - 13/11/2022
Bugfixed:
- slpkg upgrade fails when a package is blacklisted #149
4.2.8 - 06/11/2022
Updated:
- Check the SBo script exists before patching the tag

View file

@ -7,6 +7,7 @@ from distutils.version import LooseVersion
from slpkg.configs import Configs
from slpkg.queries import SBoQueries
from slpkg.blacklist import Blacklist
@dataclass
@ -19,10 +20,11 @@ class Upgrade:
print("Do not forget to run 'slpkg update' before.")
repo_packages = SBoQueries('').names()
black = Blacklist().get()
for pkg in os.listdir(self.log_packages):
if pkg.endswith(self.sbo_repo_tag):
inst_pkg_name = '-'.join(pkg.split('-')[:-3])
if pkg.endswith(self.sbo_repo_tag) and inst_pkg_name not in black:
if inst_pkg_name in repo_packages:
installed_ver = pkg.replace(f'{inst_pkg_name}-',