mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Bugfixed install noarch packages
This commit is contained in:
parent
bd699df5ab
commit
20c4b2a9a8
3 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
4.1.2 - 24/06/2022
|
||||
Bugfixed:
|
||||
- Installing noarch packages
|
||||
|
||||
4.1.1 - 23/06/2022
|
||||
Updated:
|
||||
- Cli menu view with colors
|
||||
|
|
|
@ -148,9 +148,13 @@ class Slackbuilds:
|
|||
''' Creating a list with all the finished packages for
|
||||
installation.
|
||||
'''
|
||||
build_tag = self.utils.build_tag(self.build_path, name)
|
||||
build_tag, arch = self.utils.read_dot_slackbuild(self.build_path, name)
|
||||
version = SBoQueries(name).version()
|
||||
return (f'{name}-{version}-{self.os_arch}-{build_tag[0]}'
|
||||
|
||||
if not arch:
|
||||
arch = self.os_arch
|
||||
|
||||
return (f'{name}-{version}-{arch}-{build_tag[0]}'
|
||||
f'{self.repo_tag}{self.pkg_suffix}')
|
||||
|
||||
def execute_the_script(self, path: str, name: str):
|
||||
|
|
|
@ -16,18 +16,22 @@ from slpkg.configs import Configs
|
|||
class Utilities:
|
||||
log_packages: str = Configs.log_packages
|
||||
|
||||
def build_tag(self, path: str, name: str):
|
||||
''' Opens the .SlackBuild file and reads the BUILD TAG. '''
|
||||
def read_dot_slackbuild(self, path: str, name: str):
|
||||
''' Opens the .SlackBuild file and reads the BUILD TAG and ARCH. '''
|
||||
folder = f'{path}/{name}'
|
||||
slackbuild = f'{name}.SlackBuild'
|
||||
|
||||
if os.path.isfile(f'{folder}/{slackbuild}'):
|
||||
with open(f'{folder}/{slackbuild}', 'r', encoding='utf-8') as sbo:
|
||||
lines = sbo.readlines()
|
||||
lines = sbo.read().splitlines()
|
||||
|
||||
build_tag = arch = ''
|
||||
for line in lines:
|
||||
if line.startswith('BUILD'):
|
||||
return re.findall(r'\d+', line)
|
||||
build_tag = re.findall(r'\d+', line)
|
||||
if line.startswith('ARCH'):
|
||||
arch = line.replace('ARCH=', '')
|
||||
return build_tag, arch
|
||||
|
||||
def untar_archive(self, path: str, archive: str, ext_path: str):
|
||||
''' Untar the file to the build folder. '''
|
||||
|
|
Loading…
Reference in a new issue