mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Added patching SBo TAG from the configuration file #147
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
8e0849b20d
commit
4d3c0a7778
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
4.2.4 - 30/10/2022
|
||||
Added:
|
||||
- Patching SBo TAG from the configuration file
|
||||
|
||||
4.2.3 - 28/10/2022
|
||||
Updated:
|
||||
- Creating all necessary paths from the config file
|
||||
|
|
|
@ -28,6 +28,7 @@ class Slackbuilds:
|
|||
session: str = Session
|
||||
utils: str = Utilities()
|
||||
build_path: str = Configs.build_path
|
||||
sbo_repo_tag: str = Configs.sbo_repo_tag
|
||||
sbo_repo_url: str = Configs.sbo_repo_url
|
||||
build_path: str = Configs.build_path
|
||||
tmp_slpkg: str = Configs.tmp_slpkg
|
||||
|
@ -107,6 +108,8 @@ class Slackbuilds:
|
|||
|
||||
self.utils.untar_archive(self.tmp_slpkg, file, self.build_path)
|
||||
|
||||
self.patch_sbo_tag(sbo)
|
||||
|
||||
sources = SBoQueries(sbo).sources()
|
||||
self.download_sources(sbo, sources)
|
||||
|
||||
|
@ -120,6 +123,18 @@ class Slackbuilds:
|
|||
if '--resolve-off' not in self.flags:
|
||||
self.logging_installed_dependencies(sbo)
|
||||
|
||||
def patch_sbo_tag(self, sbo):
|
||||
''' Patching SBo TAG from the configuration file. '''
|
||||
sbo_script = f'{self.build_path}/{sbo}/{sbo}.SlackBuild'
|
||||
with open(sbo_script, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
with open(sbo_script, 'w') as script:
|
||||
for line in lines:
|
||||
if line.startswith('TAG=$'):
|
||||
line = f'TAG=${{TAG:-{self.sbo_repo_tag}}}\n'
|
||||
script.write(line)
|
||||
|
||||
def logging_installed_dependencies(self, name: str):
|
||||
''' Logging installed dependencies and used for remove. '''
|
||||
exist = self.session.query(LogsDependencies.name).filter(
|
||||
|
|
Loading…
Reference in a new issue