mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated for blacklist
This commit is contained in:
parent
27d9009b44
commit
11d01cebb8
2 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from slpkg.blacklist import Blacklist
|
||||
from slpkg.repositories import Repositories
|
||||
|
||||
|
||||
|
@ -14,6 +15,7 @@ class Required:
|
|||
self.name: str = name
|
||||
self.repo: str = repo
|
||||
self.repos = Repositories()
|
||||
self.black = Blacklist()
|
||||
|
||||
self.special_repos: list = [
|
||||
self.repos.salixos_repo_name,
|
||||
|
@ -38,8 +40,9 @@ class Required:
|
|||
|
||||
# Remove requirements that are included as dependencies,
|
||||
# but are not included in the repository.
|
||||
if req not in list(self.data.keys()):
|
||||
if req not in list(self.data.keys()) or req in self.black.packages():
|
||||
required.remove(req)
|
||||
continue
|
||||
|
||||
if req:
|
||||
try:
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from slpkg.blacklist import Blacklist
|
||||
|
||||
|
||||
class Requires:
|
||||
""" Creates a list of dependencies with
|
||||
|
@ -11,6 +13,8 @@ class Requires:
|
|||
self.data: dict = data
|
||||
self.name: str = name
|
||||
|
||||
self.black = Blacklist()
|
||||
|
||||
def resolve(self) -> list:
|
||||
""" Resolve the dependencies. """
|
||||
requires: list[str] = self.data[self.name][7].split()
|
||||
|
@ -19,8 +23,9 @@ class Requires:
|
|||
|
||||
# Remove requirements that are included as dependencies,
|
||||
# but are not included in the repository.
|
||||
if req not in list(self.data.keys()):
|
||||
if req not in list(self.data.keys()) or req in self.black.packages():
|
||||
requires.remove(req)
|
||||
continue
|
||||
|
||||
if req:
|
||||
sub_requires: list[str] = self.data[req][7].split()
|
||||
|
|
Loading…
Add table
Reference in a new issue