mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Updated utils
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
20a175f6e0
commit
254d19314c
2 changed files with 9 additions and 11 deletions
|
@ -29,7 +29,7 @@ from slpkg.splitting import split_package
|
|||
from slpkg.__metadata__ import MetaData as _meta_
|
||||
|
||||
|
||||
class BlackList:
|
||||
class BlackList(Utils):
|
||||
"""Blacklist class to add, remove or listed packages
|
||||
in blacklist file."""
|
||||
def __init__(self):
|
||||
|
@ -39,7 +39,7 @@ class BlackList:
|
|||
self.blackfile = "/etc/slpkg/blacklist"
|
||||
self.black_conf = ""
|
||||
if os.path.isfile(self.blackfile):
|
||||
self.black_conf = Utils().read_file(self.blackfile)
|
||||
self.black_conf = self.read_file(self.blackfile)
|
||||
|
||||
def get_black(self):
|
||||
"""Return blacklist packages from /etc/slpkg/blacklist
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
import os
|
||||
from pkg_resources import parse_version
|
||||
|
||||
|
||||
from slpkg.utils import Utils
|
||||
from slpkg.messages import Msg
|
||||
from slpkg.log_deps import write_deps
|
||||
|
@ -48,7 +47,7 @@ from slpkg.sbo.search import sbo_search_pkg
|
|||
from slpkg.sbo.slack_find import slack_package
|
||||
|
||||
|
||||
class SBoInstall(BlackList):
|
||||
class SBoInstall(BlackList, Utils):
|
||||
"""Build and install SBo packages with all dependencies
|
||||
"""
|
||||
def __init__(self, slackbuilds, flag):
|
||||
|
@ -63,7 +62,6 @@ class SBoInstall(BlackList):
|
|||
self.grey = _meta_.color["GREY"]
|
||||
self.endc = _meta_.color["ENDC"]
|
||||
self.msg = Msg()
|
||||
self.utils = Utils()
|
||||
self.arch = SBoArch().get()
|
||||
self.build_folder = self.meta.build_path
|
||||
self._SOURCES = self.meta.SBo_SOURCES
|
||||
|
@ -174,7 +172,7 @@ class SBoInstall(BlackList):
|
|||
lowercase
|
||||
"""
|
||||
if "--case-ins" in self.flag:
|
||||
data_dict = self.utils.case_sensitive(self.data)
|
||||
data_dict = self.case_sensitive(self.data)
|
||||
for name in self.slackbuilds:
|
||||
index = self.slackbuilds.index(name)
|
||||
for key, value in data_dict.items():
|
||||
|
@ -185,8 +183,8 @@ class SBoInstall(BlackList):
|
|||
"""Update dependencies dictionary with all package
|
||||
"""
|
||||
onelist, dependencies = [], []
|
||||
onelist = self.utils.dimensional_list(self.deps)
|
||||
dependencies = self.utils.remove_dbs(onelist)
|
||||
onelist = self.dimensional_list(self.deps)
|
||||
dependencies = self.remove_dbs(onelist)
|
||||
for dep in dependencies:
|
||||
deps = Requires(self.flag).sbo(dep)
|
||||
self.deps_dict[dep] = self.one_for_all(deps)
|
||||
|
@ -214,7 +212,7 @@ class SBoInstall(BlackList):
|
|||
"""Clear master slackbuilds if already exist in dependencies
|
||||
or if added to install two or more times
|
||||
"""
|
||||
self.master_packages = self.utils.remove_dbs(self.master_packages)
|
||||
self.master_packages = self.remove_dbs(self.master_packages)
|
||||
for mas in self.master_packages:
|
||||
if mas in self.dependencies:
|
||||
self.master_packages.remove(mas)
|
||||
|
@ -247,8 +245,8 @@ class SBoInstall(BlackList):
|
|||
deps.reverse()
|
||||
# Inverting the list brings the
|
||||
# dependencies in order to be installed.
|
||||
requires = self.utils.dimensional_list(deps)
|
||||
dependencies = self.utils.remove_dbs(requires)
|
||||
requires = self.dimensional_list(deps)
|
||||
dependencies = self.remove_dbs(requires)
|
||||
return dependencies
|
||||
|
||||
def top_view(self):
|
||||
|
|
Loading…
Reference in a new issue