mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-28 19:58:18 +01:00
Updated for utilities
This commit is contained in:
parent
8b49133be2
commit
e70685aac9
1 changed files with 6 additions and 6 deletions
|
@ -24,6 +24,7 @@ class Slackbuilds:
|
||||||
flags: list
|
flags: list
|
||||||
install: bool
|
install: bool
|
||||||
session: str = Session
|
session: str = Session
|
||||||
|
utils: str = Utilities()
|
||||||
build_path: str = Metadata.build_path
|
build_path: str = Metadata.build_path
|
||||||
sbo_url: str = Metadata.sbo_url
|
sbo_url: str = Metadata.sbo_url
|
||||||
build_path: str = Metadata.build_path
|
build_path: str = Metadata.build_path
|
||||||
|
@ -54,7 +55,7 @@ class Slackbuilds:
|
||||||
view = ViewMessage()
|
view = ViewMessage()
|
||||||
|
|
||||||
if self.install:
|
if self.install:
|
||||||
view.install_packages(self.sbos_order)
|
view.install_packages(self.sbos_order, self.slackbuilds)
|
||||||
else:
|
else:
|
||||||
view.build_packages(self.sbos_order)
|
view.build_packages(self.sbos_order)
|
||||||
|
|
||||||
|
@ -80,7 +81,6 @@ class Slackbuilds:
|
||||||
def download_slackbuilds_and_build(self):
|
def download_slackbuilds_and_build(self):
|
||||||
''' Downloads files and sources and starting the build. '''
|
''' Downloads files and sources and starting the build. '''
|
||||||
wget = Wget()
|
wget = Wget()
|
||||||
utils = Utilities()
|
|
||||||
|
|
||||||
for sbo in self.sbos_order:
|
for sbo in self.sbos_order:
|
||||||
file = f'{sbo}{self.tar_suffix}'
|
file = f'{sbo}{self.tar_suffix}'
|
||||||
|
@ -93,7 +93,7 @@ class Slackbuilds:
|
||||||
|
|
||||||
wget.download(self.tmp_slpkg, url)
|
wget.download(self.tmp_slpkg, url)
|
||||||
|
|
||||||
utils.untar_archive(self.tmp_slpkg, file, self.build_path)
|
self.utils.untar_archive(self.tmp_slpkg, file, self.build_path)
|
||||||
|
|
||||||
sources = SBoQueries(sbo).sources()
|
sources = SBoQueries(sbo).sources()
|
||||||
self.download_sources(sbo, sources)
|
self.download_sources(sbo, sources)
|
||||||
|
@ -131,7 +131,8 @@ class Slackbuilds:
|
||||||
def install_package(self, package):
|
def install_package(self, package):
|
||||||
''' Install the packages that before created in the tmp directory. '''
|
''' Install the packages that before created in the tmp directory. '''
|
||||||
execute = self.installpkg
|
execute = self.installpkg
|
||||||
if '--reinstall' in self.flags:
|
if ('--reinstall' in self.flags or
|
||||||
|
self.utils.is_installed(package[:-4])):
|
||||||
execute = self.reinstall
|
execute = self.reinstall
|
||||||
command = f'{execute} {self.tmp_path}/{package}'
|
command = f'{execute} {self.tmp_path}/{package}'
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, shell=True)
|
||||||
|
@ -140,8 +141,7 @@ class Slackbuilds:
|
||||||
''' Creating a list with all the finished packages for
|
''' Creating a list with all the finished packages for
|
||||||
installation.
|
installation.
|
||||||
'''
|
'''
|
||||||
utils = Utilities()
|
build_tag = self.utils.build_tag(self.build_path, name)
|
||||||
build_tag = utils.build_tag(self.build_path, name)
|
|
||||||
version = SBoQueries(name).version()
|
version = SBoQueries(name).version()
|
||||||
return (f'{name}-{version}-{self.os_arch}-{build_tag[0]}'
|
return (f'{name}-{version}-{self.os_arch}-{build_tag[0]}'
|
||||||
f'{self.repo_tag}{self.pkg_suffix}')
|
f'{self.repo_tag}{self.pkg_suffix}')
|
||||||
|
|
Loading…
Add table
Reference in a new issue