mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Turn _SOURCES path in _metadata_
This commit is contained in:
parent
a404ad9e08
commit
8d26a803a5
6 changed files with 20 additions and 15 deletions
|
@ -163,6 +163,9 @@ class MetaData(object):
|
|||
prg_bar = _conf_slpkg["PRG_BAR"]
|
||||
editor = _conf_slpkg["EDITOR"]
|
||||
|
||||
# SBo downloading sources path
|
||||
_SBo_SOURCES = build_path + "_SOURCES/"
|
||||
|
||||
# Remove any gaps
|
||||
repositories = [repo.strip() for repo in repositories]
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ class Initialization(object):
|
|||
self.lib_path = self.meta.lib_path
|
||||
self.tmp_path = self.meta.tmp_path
|
||||
self.build_path = self.meta.build_path
|
||||
self._SOURCES = self.meta._SBo_SOURCES
|
||||
self.slpkg_tmp_packages = self.meta.slpkg_tmp_packages
|
||||
self.slpkg_tmp_patches = self.meta.slpkg_tmp_patches
|
||||
if not os.path.exists(self.conf_path):
|
||||
|
@ -60,8 +61,8 @@ class Initialization(object):
|
|||
os.mkdir(self.tmp_path)
|
||||
if not os.path.exists(self.build_path):
|
||||
os.makedirs(self.build_path)
|
||||
if not os.path.exists(self.build_path + "_SOURCES/"):
|
||||
os.makedirs(self.build_path + "_SOURCES/")
|
||||
if not os.path.exists(self._SOURCES):
|
||||
os.makedirs(self._SOURCES)
|
||||
if not os.path.exists(self.slpkg_tmp_packages):
|
||||
os.makedirs(self.slpkg_tmp_packages)
|
||||
if not os.path.exists(self.slpkg_tmp_patches):
|
||||
|
|
|
@ -48,6 +48,7 @@ class BuildPackage(object):
|
|||
self.auto = auto
|
||||
self.meta = _meta_
|
||||
self.msg = Msg()
|
||||
self._SOURCES = self.meta._SBo_SOURCES
|
||||
self.prgnam = self.script[:-7]
|
||||
self.log_file = "build_{0}_log".format(self.prgnam)
|
||||
self.sbo_logs = self.meta.log_path + "sbo/"
|
||||
|
@ -76,7 +77,7 @@ class BuildPackage(object):
|
|||
self._delete_sbo_tar_gz()
|
||||
self._create_md5_dict()
|
||||
if not self.auto:
|
||||
os.chdir(self.path + "_SOURCES/")
|
||||
os.chdir(self._SOURCES)
|
||||
for src in self.sources:
|
||||
# fix build sources with spaces
|
||||
src = src.replace("%20", " ")
|
||||
|
|
|
@ -68,6 +68,7 @@ class SBoNetwork(object):
|
|||
self.grey = self.meta.color["GREY"]
|
||||
self.endc = self.meta.color["ENDC"]
|
||||
self.build_folder = self.meta.build_path
|
||||
self._SOURCES = self.meta._SBo_SOURCES
|
||||
self.msg.reading()
|
||||
self.data = SBoGrep(name="").names()
|
||||
self.case_insensitive()
|
||||
|
@ -367,13 +368,12 @@ class SBoNetwork(object):
|
|||
sources = []
|
||||
if not os.path.exists(self.meta.build_path):
|
||||
os.makedirs(self.meta.build_path)
|
||||
if not os.path.exists(self.meta.build_path + "_SOURCES/"):
|
||||
os.makedirs(self.meta.build_path + "_SOURCES/")
|
||||
if not os.path.exists(self._SOURCES):
|
||||
os.makedirs(self._SOURCES)
|
||||
os.chdir(self.meta.build_path)
|
||||
Download(self.meta.build_path, self.sbo_dwn.split(),
|
||||
repo="sbo").start()
|
||||
Download(self.meta.build_path + "_SOURCES/", self.source_dwn,
|
||||
repo="sbo").start()
|
||||
Download(self._SOURCES, self.source_dwn, repo="sbo").start()
|
||||
script = self.sbo_dwn.split("/")[-1]
|
||||
for src in self.source_dwn:
|
||||
sources.append(src.split("/")[-1])
|
||||
|
|
|
@ -53,6 +53,7 @@ class QueuePkgs(object):
|
|||
self.quit = False
|
||||
self.queue = self.meta.lib_path + "queue/"
|
||||
self.queue_list = self.queue + "queue_list"
|
||||
self._SOURCES = self.meta._SBo_SOURCES
|
||||
if not os.path.exists(self.meta.lib_path):
|
||||
os.mkdir(self.meta.lib_path)
|
||||
if not os.path.exists(self.queue):
|
||||
|
@ -133,8 +134,8 @@ class QueuePkgs(object):
|
|||
for pkg in packages:
|
||||
if not os.path.exists(self.meta.build_path):
|
||||
os.mkdir(self.meta.build_path)
|
||||
if not os.path.exists(self.meta.build_path + "_SOURCES/"):
|
||||
os.mkdir(self.meta.build_path + "_SOURCES/")
|
||||
if not os.path.exists(self._SOURCES):
|
||||
os.mkdir(self._SOURCES)
|
||||
sbo_url = sbo_search_pkg(pkg)
|
||||
sbo_dwn = SBoLink(sbo_url).tar_gz()
|
||||
source_dwn = SBoGrep(pkg).source().split()
|
||||
|
@ -144,8 +145,7 @@ class QueuePkgs(object):
|
|||
Download(self.meta.build_path, sbo_dwn.split(),
|
||||
repo="sbo").start()
|
||||
for src in source_dwn:
|
||||
Download(self.meta.build_path + "_SOURCES/", src.split(),
|
||||
repo="sbo").start()
|
||||
Download(self._SOURCES, src.split(), repo="sbo").start()
|
||||
sources.append(src.split("/")[-1])
|
||||
BuildPackage(script, sources, self.meta.build_path,
|
||||
auto=False).build()
|
||||
|
|
|
@ -56,6 +56,7 @@ class SBoInstall(object):
|
|||
self.msg = Msg()
|
||||
self.arch = SBoArch().get()
|
||||
self.build_folder = self.meta.build_path
|
||||
self._SOURCES = self.meta._SBo_SOURCES
|
||||
for fl in self.flag:
|
||||
if fl.startswith("--directory-prefix="):
|
||||
self.build_folder = fl.split("=")[1]
|
||||
|
@ -304,8 +305,8 @@ class SBoInstall(object):
|
|||
installs, upgraded, = [], []
|
||||
if not os.path.exists(self.build_folder):
|
||||
os.makedirs(self.build_folder)
|
||||
if not os.path.exists(self.build_folder + "_SOURCES/"):
|
||||
os.makedirs(self.build_folder + "_SOURCES/")
|
||||
if not os.path.exists(self._SOURCES):
|
||||
os.makedirs(self._SOURCES)
|
||||
os.chdir(self.build_folder)
|
||||
for prgnam in slackbuilds:
|
||||
pkg = "-".join(prgnam.split("-")[:-1])
|
||||
|
@ -327,8 +328,7 @@ class SBoInstall(object):
|
|||
script = sbo_link.split("/")[-1]
|
||||
Download(self.build_folder, sbo_link.split(),
|
||||
repo="sbo").start()
|
||||
Download(self.build_folder + "_SOURCES/", src_link,
|
||||
repo="sbo").start()
|
||||
Download(self._SOURCES, src_link, repo="sbo").start()
|
||||
if "--download-only" in self.flag:
|
||||
continue
|
||||
sources = self.filenames(src_link)
|
||||
|
|
Loading…
Reference in a new issue