Updated code

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2020-02-04 23:23:12 +01:00
parent bcd22456e0
commit 6dba505b84
7 changed files with 14 additions and 12 deletions

View file

@ -51,6 +51,11 @@ class Initialization:
self._SOURCES = self.meta.SBo_SOURCES
self.slpkg_tmp_packages = self.meta.slpkg_tmp_packages
self.slpkg_tmp_patches = self.meta.slpkg_tmp_patches
self.constructing()
def constructing(self):
"""Creating the all necessary directories
"""
if not os.path.exists(self.conf_path):
os.mkdir(self.conf_path)
if not os.path.exists(self.log_path):

View file

@ -37,12 +37,12 @@ def library(repo):
pkg_list, packages = [], ""
if repo == "sbo":
if (os.path.isfile(
_meta_.lib_path + f"{repo}_repo/SLACKBUILDS.TXT")):
packages = Utils().read_file(_meta_.lib_path + f"{repo}_repo/SLACKBUILDS.TXT")
f"{_meta_.lib_path}{repo}_repo/SLACKBUILDS.TXT")):
packages = Utils().read_file(f"{_meta_.lib_path}{repo}_repo/SLACKBUILDS.TXT")
else:
if (os.path.isfile(
_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT")):
packages = Utils().read_file(_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT")
f"{_meta_.lib_path}{repo}_repo/PACKAGES.TXT")):
packages = Utils().read_file(f"{_meta_.lib_path}{repo}_repo/PACKAGES.TXT")
for line in packages.splitlines():
if repo == "sbo":
if line.startswith("SLACKBUILD NAME: "):

View file

@ -324,11 +324,11 @@ class ArgParse:
else:
usage(self.args[1])
elif len(self.args) == 1 and self.args[0] in options:
Updates(repo="").ALL()
Updates(repo="").ALL()
elif len(self.args) == 2 and self.args[0] in options:
Updates(self.args[1]).run()
Updates(self.args[1]).run()
elif (len(self.args) >= 2 and self.args[0] in options and
self.args[1] not in self.meta.repositories):
self.args[1] not in self.meta.repositories):
usage(self.args[1])
else:
usage("")

View file

@ -80,5 +80,5 @@ class FindFromRepos:
"""
ver = ""
if repo == "sbo":
ver = "-" + SBoGrep(find).version()
ver = f"-{SBoGrep(find).version()}"
return ver

View file

@ -68,5 +68,4 @@ class Requires:
"""
if dependencies:
self.dep_results.append(dependencies)
for dep in dependencies:
self.sbo(dep)
[self.sbo(dep) for dep in dependencies]

View file

@ -23,7 +23,6 @@
import os
import sys
import pydoc
from slpkg.utils import Utils

View file

@ -353,7 +353,6 @@ class SBoInstall:
if "--download-only" in self.flag:
continue
sources = list(self.filenames(src_link))
print(sources)
BuildPackage(script, sources, self.build_folder,
auto=False).build()
binary = slack_package(prgnam)