mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Fixed remove packages
This commit is contained in:
parent
71b6862d48
commit
01e629870e
4 changed files with 9 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
|||
4.3.6 - 08/12/2022
|
||||
Fixed:
|
||||
- Remove packages
|
||||
|
||||
4.3.5 - 07/12/2022
|
||||
Updated:
|
||||
- Code style
|
||||
|
|
|
@ -42,8 +42,8 @@ class Check:
|
|||
|
||||
for sbo in slackbuilds:
|
||||
for package in os.listdir(self.configs.log_packages):
|
||||
if (package.startswith(f'{sbo}-') and
|
||||
package.endswith(self.configs.sbo_repo_tag)):
|
||||
pkg = '-'.join(package.split('-')[:-3])
|
||||
if sbo == pkg and package.endswith(self.configs.sbo_repo_tag):
|
||||
found.append(sbo)
|
||||
|
||||
for sbo in slackbuilds:
|
||||
|
|
|
@ -24,7 +24,7 @@ from slpkg.update_repository import UpdateRepository
|
|||
class Argparse:
|
||||
|
||||
def __init__(self, args):
|
||||
self.args: list = args
|
||||
self.args = args
|
||||
self.usage = Usage()
|
||||
|
||||
if len(self.args) == 0:
|
||||
|
|
|
@ -67,7 +67,6 @@ class ViewMessage:
|
|||
""" View remove packages. """
|
||||
print('The following packages will be removed:\n')
|
||||
slackbuilds, dependencies, deps = [], [], []
|
||||
|
||||
for pkg in packages:
|
||||
self._view_installed_packages(pkg)
|
||||
slackbuilds.append(pkg)
|
||||
|
@ -145,10 +144,8 @@ class ViewMessage:
|
|||
color = self.colors()
|
||||
|
||||
for package in installed:
|
||||
black = package.split('-')[0]
|
||||
if (package.startswith(f'{name}-') and
|
||||
self.configs.sbo_repo_tag in package and
|
||||
black not in self.black.get()):
|
||||
pkg = '-'.join(package.split('-')[:-3])
|
||||
if pkg == name and self.configs.sbo_repo_tag in package and pkg 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