mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-10 20:01:54 +01:00
Merge branch 'develop'
This commit is contained in:
commit
034def7294
5 changed files with 23 additions and 10 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
|
||||
|
|
|
@ -30,8 +30,8 @@ Install from the official third-party `SBo repository <https://slackbuilds.org/r
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ tar xvf slpkg-4.1.1.tar.gz
|
||||
$ cd slpkg-4.1.1
|
||||
$ tar xvf slpkg-4.1.2.tar.gz
|
||||
$ cd slpkg-4.1.2
|
||||
$ ./install.sh
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ class Slackbuilds:
|
|||
tmp_slpkg: str = Configs.tmp_slpkg
|
||||
tmp_path: str = Configs.tmp_path
|
||||
tar_suffix: str = Configs.tar_suffix
|
||||
os_arch: str = Configs.os_arch
|
||||
repo_tag: str = Configs.repo_tag
|
||||
pkg_suffix: str = Configs.pkg_suffix
|
||||
installpkg: str = Configs.installpkg
|
||||
|
@ -148,9 +147,10 @@ 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]}'
|
||||
|
||||
return (f'{name}-{version}-{arch}-{build_tag[0]}'
|
||||
f'{self.repo_tag}{self.pkg_suffix}')
|
||||
|
||||
def execute_the_script(self, path: str, name: str):
|
||||
|
|
|
@ -15,19 +15,28 @@ from slpkg.configs import Configs
|
|||
@dataclass
|
||||
class Utilities:
|
||||
log_packages: str = Configs.log_packages
|
||||
os_arch: str = Configs.os_arch
|
||||
|
||||
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=', '')
|
||||
|
||||
if not arch:
|
||||
arch = self.os_arch
|
||||
|
||||
return build_tag, arch
|
||||
|
||||
def untar_archive(self, path: str, archive: str, ext_path: str):
|
||||
''' Untar the file to the build folder. '''
|
||||
|
|
|
@ -10,7 +10,7 @@ from slpkg.configs import Configs
|
|||
@dataclass
|
||||
class Version:
|
||||
prog_name: str = Configs.prog_name
|
||||
version_info: tuple = (4, 1, 1)
|
||||
version_info: tuple = (4, 1, 2)
|
||||
version: str = '{0}.{1}.{2}'.format(*version_info)
|
||||
license: str = 'MIT License'
|
||||
author: str = 'dslackw'
|
||||
|
|
Loading…
Reference in a new issue