mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
Fixed for salixos required
This commit is contained in:
parent
873f742848
commit
ab62b41612
2 changed files with 16 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from slpkg.repositories import Repositories
|
||||
from slpkg.binaries.queries import BinQueries
|
||||
|
||||
|
||||
|
@ -11,12 +12,16 @@ class Required:
|
|||
def __init__(self, name: str, repo: str):
|
||||
self.name: str = name
|
||||
self.repo: str = repo
|
||||
self.repos = Repositories()
|
||||
self.repo_package_names: list = BinQueries(name, self.repo).all_package_names_by_repo()
|
||||
|
||||
def resolve(self) -> list:
|
||||
""" Resolve the dependencies. """
|
||||
requires: list[str] = BinQueries(self.name, self.repo).required()
|
||||
|
||||
if self.repos.salixos_repo_name:
|
||||
return requires
|
||||
|
||||
for req in requires:
|
||||
if req:
|
||||
sub: list[str] = BinQueries(req, self.repo).required()
|
||||
|
|
|
@ -758,13 +758,17 @@ class InstallData(Configs):
|
|||
cache.append(f'{package_size_uncomp}B')
|
||||
|
||||
if line.startswith(pkg_tag[4]):
|
||||
required = line.replace(
|
||||
pkg_tag[4], '').replace(
|
||||
',', ' ').replace(
|
||||
'|', ' ').strip()
|
||||
list_required: list = required.split(' ')
|
||||
package_required: str = ' '.join(list(set(list_required)))
|
||||
cache.append(package_required)
|
||||
deps: list = []
|
||||
required = line.replace(pkg_tag[4], '').strip()
|
||||
|
||||
for req in required.split(','):
|
||||
dep = req.split('|')
|
||||
if len(dep) > 1:
|
||||
deps.append(dep[1])
|
||||
else:
|
||||
deps += dep
|
||||
|
||||
cache.append(' '.join(deps))
|
||||
|
||||
if line.startswith(pkg_tag[5]):
|
||||
package_description = line.replace(pkg_tag[5], '').strip()
|
||||
|
|
Loading…
Reference in a new issue