mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-06 08:46:21 +01:00
Created generator allias
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
9eeae12baf
commit
4809e3cbc2
2 changed files with 20 additions and 11 deletions
|
@ -47,14 +47,18 @@ class SBoGrep:
|
||||||
self.unst = ["UNSUPPORTED", "UNTESTED"]
|
self.unst = ["UNSUPPORTED", "UNTESTED"]
|
||||||
self.SLACKBUILDS_TXT = Utils().read_file(self.sbo_txt)
|
self.SLACKBUILDS_TXT = Utils().read_file(self.sbo_txt)
|
||||||
|
|
||||||
def names(self):
|
def _names_grabbing(self):
|
||||||
"""Grab all packages name
|
"""Generator that collecting all packages names
|
||||||
"""
|
"""
|
||||||
pkg_names = []
|
|
||||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||||
if line.startswith(self.line_name):
|
if line.startswith(self.line_name):
|
||||||
pkg_names.append(line[17:].strip())
|
yield line[17:].strip()
|
||||||
return pkg_names
|
|
||||||
|
def names(self):
|
||||||
|
"""Alias method convert generator and return
|
||||||
|
a list
|
||||||
|
"""
|
||||||
|
return list(self._names_grabbing())
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
"""Grab sources downloads links
|
"""Grab sources downloads links
|
||||||
|
@ -138,7 +142,7 @@ class SBoGrep:
|
||||||
return md5sum64
|
return md5sum64
|
||||||
|
|
||||||
def description(self):
|
def description(self):
|
||||||
"""Grab package verion
|
"""Grab package version
|
||||||
"""
|
"""
|
||||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||||
if line.startswith(self.line_name):
|
if line.startswith(self.line_name):
|
||||||
|
|
|
@ -65,11 +65,7 @@ class SBoInstall:
|
||||||
self.arch = SBoArch().get()
|
self.arch = SBoArch().get()
|
||||||
self.build_folder = self.meta.build_path
|
self.build_folder = self.meta.build_path
|
||||||
self._SOURCES = self.meta.SBo_SOURCES
|
self._SOURCES = self.meta.SBo_SOURCES
|
||||||
for fl in self.flag:
|
self.init_flags()
|
||||||
if fl.startswith("--directory-prefix="):
|
|
||||||
self.build_folder = fl.split("=")[1]
|
|
||||||
if not self.build_folder.endswith("/"):
|
|
||||||
self.build_folder += "/"
|
|
||||||
self.unst = ["UNSUPPORTED", "UNTESTED"]
|
self.unst = ["UNSUPPORTED", "UNTESTED"]
|
||||||
self.master_packages = []
|
self.master_packages = []
|
||||||
self.deps = []
|
self.deps = []
|
||||||
|
@ -86,6 +82,15 @@ class SBoInstall:
|
||||||
self.data = SBoGrep(name="").names()
|
self.data = SBoGrep(name="").names()
|
||||||
self.blacklist = BlackList().packages(pkgs=self.data, repo="sbo")
|
self.blacklist = BlackList().packages(pkgs=self.data, repo="sbo")
|
||||||
|
|
||||||
|
def init_flags(self):
|
||||||
|
"""Flags initialization
|
||||||
|
"""
|
||||||
|
for fl in self.flag:
|
||||||
|
if fl.startswith("--directory-prefix="):
|
||||||
|
self.build_folder = fl.split("=")[1]
|
||||||
|
if not self.build_folder.endswith("/"):
|
||||||
|
self.build_folder += "/"
|
||||||
|
|
||||||
def start(self, is_upgrade):
|
def start(self, is_upgrade):
|
||||||
"""Start view, build and install SBo packages
|
"""Start view, build and install SBo packages
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue