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"]
|
prg_bar = _conf_slpkg["PRG_BAR"]
|
||||||
editor = _conf_slpkg["EDITOR"]
|
editor = _conf_slpkg["EDITOR"]
|
||||||
|
|
||||||
|
# SBo downloading sources path
|
||||||
|
_SBo_SOURCES = build_path + "_SOURCES/"
|
||||||
|
|
||||||
# Remove any gaps
|
# Remove any gaps
|
||||||
repositories = [repo.strip() for repo in repositories]
|
repositories = [repo.strip() for repo in repositories]
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ class Initialization(object):
|
||||||
self.lib_path = self.meta.lib_path
|
self.lib_path = self.meta.lib_path
|
||||||
self.tmp_path = self.meta.tmp_path
|
self.tmp_path = self.meta.tmp_path
|
||||||
self.build_path = self.meta.build_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_packages = self.meta.slpkg_tmp_packages
|
||||||
self.slpkg_tmp_patches = self.meta.slpkg_tmp_patches
|
self.slpkg_tmp_patches = self.meta.slpkg_tmp_patches
|
||||||
if not os.path.exists(self.conf_path):
|
if not os.path.exists(self.conf_path):
|
||||||
|
@ -60,8 +61,8 @@ class Initialization(object):
|
||||||
os.mkdir(self.tmp_path)
|
os.mkdir(self.tmp_path)
|
||||||
if not os.path.exists(self.build_path):
|
if not os.path.exists(self.build_path):
|
||||||
os.makedirs(self.build_path)
|
os.makedirs(self.build_path)
|
||||||
if not os.path.exists(self.build_path + "_SOURCES/"):
|
if not os.path.exists(self._SOURCES):
|
||||||
os.makedirs(self.build_path + "_SOURCES/")
|
os.makedirs(self._SOURCES)
|
||||||
if not os.path.exists(self.slpkg_tmp_packages):
|
if not os.path.exists(self.slpkg_tmp_packages):
|
||||||
os.makedirs(self.slpkg_tmp_packages)
|
os.makedirs(self.slpkg_tmp_packages)
|
||||||
if not os.path.exists(self.slpkg_tmp_patches):
|
if not os.path.exists(self.slpkg_tmp_patches):
|
||||||
|
|
|
@ -48,6 +48,7 @@ class BuildPackage(object):
|
||||||
self.auto = auto
|
self.auto = auto
|
||||||
self.meta = _meta_
|
self.meta = _meta_
|
||||||
self.msg = Msg()
|
self.msg = Msg()
|
||||||
|
self._SOURCES = self.meta._SBo_SOURCES
|
||||||
self.prgnam = self.script[:-7]
|
self.prgnam = self.script[:-7]
|
||||||
self.log_file = "build_{0}_log".format(self.prgnam)
|
self.log_file = "build_{0}_log".format(self.prgnam)
|
||||||
self.sbo_logs = self.meta.log_path + "sbo/"
|
self.sbo_logs = self.meta.log_path + "sbo/"
|
||||||
|
@ -76,7 +77,7 @@ class BuildPackage(object):
|
||||||
self._delete_sbo_tar_gz()
|
self._delete_sbo_tar_gz()
|
||||||
self._create_md5_dict()
|
self._create_md5_dict()
|
||||||
if not self.auto:
|
if not self.auto:
|
||||||
os.chdir(self.path + "_SOURCES/")
|
os.chdir(self._SOURCES)
|
||||||
for src in self.sources:
|
for src in self.sources:
|
||||||
# fix build sources with spaces
|
# fix build sources with spaces
|
||||||
src = src.replace("%20", " ")
|
src = src.replace("%20", " ")
|
||||||
|
|
|
@ -68,6 +68,7 @@ class SBoNetwork(object):
|
||||||
self.grey = self.meta.color["GREY"]
|
self.grey = self.meta.color["GREY"]
|
||||||
self.endc = self.meta.color["ENDC"]
|
self.endc = self.meta.color["ENDC"]
|
||||||
self.build_folder = self.meta.build_path
|
self.build_folder = self.meta.build_path
|
||||||
|
self._SOURCES = self.meta._SBo_SOURCES
|
||||||
self.msg.reading()
|
self.msg.reading()
|
||||||
self.data = SBoGrep(name="").names()
|
self.data = SBoGrep(name="").names()
|
||||||
self.case_insensitive()
|
self.case_insensitive()
|
||||||
|
@ -367,13 +368,12 @@ class SBoNetwork(object):
|
||||||
sources = []
|
sources = []
|
||||||
if not os.path.exists(self.meta.build_path):
|
if not os.path.exists(self.meta.build_path):
|
||||||
os.makedirs(self.meta.build_path)
|
os.makedirs(self.meta.build_path)
|
||||||
if not os.path.exists(self.meta.build_path + "_SOURCES/"):
|
if not os.path.exists(self._SOURCES):
|
||||||
os.makedirs(self.meta.build_path + "_SOURCES/")
|
os.makedirs(self._SOURCES)
|
||||||
os.chdir(self.meta.build_path)
|
os.chdir(self.meta.build_path)
|
||||||
Download(self.meta.build_path, self.sbo_dwn.split(),
|
Download(self.meta.build_path, self.sbo_dwn.split(),
|
||||||
repo="sbo").start()
|
repo="sbo").start()
|
||||||
Download(self.meta.build_path + "_SOURCES/", self.source_dwn,
|
Download(self._SOURCES, self.source_dwn, repo="sbo").start()
|
||||||
repo="sbo").start()
|
|
||||||
script = self.sbo_dwn.split("/")[-1]
|
script = self.sbo_dwn.split("/")[-1]
|
||||||
for src in self.source_dwn:
|
for src in self.source_dwn:
|
||||||
sources.append(src.split("/")[-1])
|
sources.append(src.split("/")[-1])
|
||||||
|
|
|
@ -53,6 +53,7 @@ class QueuePkgs(object):
|
||||||
self.quit = False
|
self.quit = False
|
||||||
self.queue = self.meta.lib_path + "queue/"
|
self.queue = self.meta.lib_path + "queue/"
|
||||||
self.queue_list = self.queue + "queue_list"
|
self.queue_list = self.queue + "queue_list"
|
||||||
|
self._SOURCES = self.meta._SBo_SOURCES
|
||||||
if not os.path.exists(self.meta.lib_path):
|
if not os.path.exists(self.meta.lib_path):
|
||||||
os.mkdir(self.meta.lib_path)
|
os.mkdir(self.meta.lib_path)
|
||||||
if not os.path.exists(self.queue):
|
if not os.path.exists(self.queue):
|
||||||
|
@ -133,8 +134,8 @@ class QueuePkgs(object):
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
if not os.path.exists(self.meta.build_path):
|
if not os.path.exists(self.meta.build_path):
|
||||||
os.mkdir(self.meta.build_path)
|
os.mkdir(self.meta.build_path)
|
||||||
if not os.path.exists(self.meta.build_path + "_SOURCES/"):
|
if not os.path.exists(self._SOURCES):
|
||||||
os.mkdir(self.meta.build_path + "_SOURCES/")
|
os.mkdir(self._SOURCES)
|
||||||
sbo_url = sbo_search_pkg(pkg)
|
sbo_url = sbo_search_pkg(pkg)
|
||||||
sbo_dwn = SBoLink(sbo_url).tar_gz()
|
sbo_dwn = SBoLink(sbo_url).tar_gz()
|
||||||
source_dwn = SBoGrep(pkg).source().split()
|
source_dwn = SBoGrep(pkg).source().split()
|
||||||
|
@ -144,8 +145,7 @@ class QueuePkgs(object):
|
||||||
Download(self.meta.build_path, sbo_dwn.split(),
|
Download(self.meta.build_path, sbo_dwn.split(),
|
||||||
repo="sbo").start()
|
repo="sbo").start()
|
||||||
for src in source_dwn:
|
for src in source_dwn:
|
||||||
Download(self.meta.build_path + "_SOURCES/", src.split(),
|
Download(self._SOURCES, src.split(), repo="sbo").start()
|
||||||
repo="sbo").start()
|
|
||||||
sources.append(src.split("/")[-1])
|
sources.append(src.split("/")[-1])
|
||||||
BuildPackage(script, sources, self.meta.build_path,
|
BuildPackage(script, sources, self.meta.build_path,
|
||||||
auto=False).build()
|
auto=False).build()
|
||||||
|
|
|
@ -56,6 +56,7 @@ class SBoInstall(object):
|
||||||
self.msg = Msg()
|
self.msg = Msg()
|
||||||
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
|
||||||
for fl in self.flag:
|
for fl in self.flag:
|
||||||
if fl.startswith("--directory-prefix="):
|
if fl.startswith("--directory-prefix="):
|
||||||
self.build_folder = fl.split("=")[1]
|
self.build_folder = fl.split("=")[1]
|
||||||
|
@ -304,8 +305,8 @@ class SBoInstall(object):
|
||||||
installs, upgraded, = [], []
|
installs, upgraded, = [], []
|
||||||
if not os.path.exists(self.build_folder):
|
if not os.path.exists(self.build_folder):
|
||||||
os.makedirs(self.build_folder)
|
os.makedirs(self.build_folder)
|
||||||
if not os.path.exists(self.build_folder + "_SOURCES/"):
|
if not os.path.exists(self._SOURCES):
|
||||||
os.makedirs(self.build_folder + "_SOURCES/")
|
os.makedirs(self._SOURCES)
|
||||||
os.chdir(self.build_folder)
|
os.chdir(self.build_folder)
|
||||||
for prgnam in slackbuilds:
|
for prgnam in slackbuilds:
|
||||||
pkg = "-".join(prgnam.split("-")[:-1])
|
pkg = "-".join(prgnam.split("-")[:-1])
|
||||||
|
@ -327,8 +328,7 @@ class SBoInstall(object):
|
||||||
script = sbo_link.split("/")[-1]
|
script = sbo_link.split("/")[-1]
|
||||||
Download(self.build_folder, sbo_link.split(),
|
Download(self.build_folder, sbo_link.split(),
|
||||||
repo="sbo").start()
|
repo="sbo").start()
|
||||||
Download(self.build_folder + "_SOURCES/", src_link,
|
Download(self._SOURCES, src_link, repo="sbo").start()
|
||||||
repo="sbo").start()
|
|
||||||
if "--download-only" in self.flag:
|
if "--download-only" in self.flag:
|
||||||
continue
|
continue
|
||||||
sources = self.filenames(src_link)
|
sources = self.filenames(src_link)
|
||||||
|
|
Loading…
Reference in a new issue