mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-26 19:58:50 +01:00
Fixed for blacklist
This commit is contained in:
parent
aa4197a27b
commit
cd6995c3d5
1 changed files with 6 additions and 1 deletions
|
@ -7,6 +7,7 @@ import subprocess
|
|||
from slpkg.metadata import Metadata
|
||||
|
||||
from dataclasses import dataclass
|
||||
from slpkg.blacklist import Blacklist
|
||||
from slpkg.views.views import ViewMessage
|
||||
from slpkg.models.models import LogsDependencies
|
||||
from slpkg.models.models import session as Session
|
||||
|
@ -18,6 +19,7 @@ class RemovePackages:
|
|||
packages: str
|
||||
flags: list
|
||||
session: str = Session
|
||||
black: list = Blacklist()
|
||||
log_packages: str = Metadata.log_packages
|
||||
repo_tag: str = Metadata.repo_tag
|
||||
removepkg: str = Metadata.removepkg
|
||||
|
@ -73,7 +75,10 @@ class RemovePackages:
|
|||
''' View and creates list with packages for remove. '''
|
||||
installed = os.listdir(self.log_packages)
|
||||
color = self.color()
|
||||
|
||||
for package in installed:
|
||||
if package.startswith(name) and self.repo_tag in package:
|
||||
black = package.split('-')[0]
|
||||
if (package.startswith(name) and self.repo_tag in package and
|
||||
black not in self.black.get()):
|
||||
self.installed_packages.append(package)
|
||||
print(f'[{color["RED"]} delete {color["ENDC"]}] -> {package}')
|
||||
|
|
Loading…
Add table
Reference in a new issue