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
32ab26b7ed
18 changed files with 90 additions and 74 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
4.2.1 - 18/10/2022
|
||||||
|
Added:
|
||||||
|
- Print the README file in the search option
|
||||||
|
Updated:
|
||||||
|
- Configs for sbo repository
|
||||||
|
|
||||||
4.2.0 - 14/10/2022
|
4.2.0 - 14/10/2022
|
||||||
Updated:
|
Updated:
|
||||||
- Moved option --download-only to commands
|
- Moved option --download-only to commands
|
||||||
|
|
|
@ -30,8 +30,8 @@ Install from the official third-party `SBo repository <https://slackbuilds.org/r
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tar xvf slpkg-4.2.0.tar.gz
|
$ tar xvf slpkg-4.2.1.tar.gz
|
||||||
$ cd slpkg-4.2.0
|
$ cd slpkg-4.2.1
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
blacklist:
|
blacklist:
|
||||||
|
|
||||||
|
# Add packages and separate them with commas.
|
||||||
packages: []
|
packages: []
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
configs:
|
configs:
|
||||||
|
# OS architecture by default.
|
||||||
os_arch: x86_64
|
os_arch: x86_64
|
||||||
|
|
||||||
|
# All necessary paths.
|
||||||
tmp_path: /tmp
|
tmp_path: /tmp
|
||||||
tmp_slpkg: /tmp/slpkg
|
tmp_slpkg: /tmp/slpkg
|
||||||
build_path: /tmp/slpkg/build
|
build_path: /tmp/slpkg/build
|
||||||
|
@ -9,15 +12,23 @@ configs:
|
||||||
db_path: /var/lib/slpkg/database
|
db_path: /var/lib/slpkg/database
|
||||||
sbo_repo_path: /var/lib/slpkg/repository
|
sbo_repo_path: /var/lib/slpkg/repository
|
||||||
log_packages: /var/log/packages
|
log_packages: /var/log/packages
|
||||||
|
|
||||||
|
# Database name.
|
||||||
database: database.slpkg
|
database: database.slpkg
|
||||||
repo_version: 15.0
|
|
||||||
sbo_url: http://slackbuilds.org/slackbuilds/15.0
|
# SBo repository configs.
|
||||||
|
sbo_repo_url: http://slackbuilds.org/slackbuilds/15.0
|
||||||
sbo_txt: SLACKBUILDS.TXT
|
sbo_txt: SLACKBUILDS.TXT
|
||||||
tar_suffix: .tar.gz
|
sbo_tar_suffix: .tar.gz
|
||||||
pkg_suffix: .tgz
|
sbo_repo_tag: _SBo
|
||||||
repo_tag: _SBo
|
|
||||||
|
# Slackware commands.
|
||||||
installpkg: upgradepkg --install-new
|
installpkg: upgradepkg --install-new
|
||||||
reinstall: upgradepkg --reinstall
|
reinstall: upgradepkg --reinstall
|
||||||
removepkg: removepkg
|
removepkg: removepkg
|
||||||
|
|
||||||
|
# Cli menu colors configs.
|
||||||
colors: on
|
colors: on
|
||||||
|
|
||||||
|
# Wget options.
|
||||||
wget_options: -c -N
|
wget_options: -c -N
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = slpkg
|
name = slpkg
|
||||||
version = 4.2.0
|
version = 4.2.1
|
||||||
license_file = LICENSE
|
license_file = LICENSE
|
||||||
author = Dimitris Zlatanidis
|
author = Dimitris Zlatanidis
|
||||||
author_email = d.zlatanidis@gmail.com
|
author_email = d.zlatanidis@gmail.com
|
||||||
|
|
|
@ -13,7 +13,7 @@ from slpkg.blacklist import Blacklist
|
||||||
class Check:
|
class Check:
|
||||||
''' Some checks before proceed. '''
|
''' Some checks before proceed. '''
|
||||||
log_packages: str = Configs.log_packages
|
log_packages: str = Configs.log_packages
|
||||||
repo_tag: str = Configs.repo_tag
|
sbo_repo_tag: str = Configs.sbo_repo_tag
|
||||||
|
|
||||||
def exists(self, slackbuilds: list):
|
def exists(self, slackbuilds: list):
|
||||||
''' Checking if the slackbuild exists in the repository. '''
|
''' Checking if the slackbuild exists in the repository. '''
|
||||||
|
@ -42,7 +42,7 @@ class Check:
|
||||||
for package in os.listdir(self.log_packages):
|
for package in os.listdir(self.log_packages):
|
||||||
for sbo in slackbuilds:
|
for sbo in slackbuilds:
|
||||||
|
|
||||||
if sbo + '-' in package and self.repo_tag in package:
|
if sbo + '-' in package and self.sbo_repo_tag in package:
|
||||||
return
|
return
|
||||||
|
|
||||||
raise SystemExit('\nNot found installed packages.\n')
|
raise SystemExit('\nNot found installed packages.\n')
|
||||||
|
|
|
@ -32,21 +32,21 @@ class Configs:
|
||||||
# Database name
|
# Database name
|
||||||
database: str = f'database.{prog_name}'
|
database: str = f'database.{prog_name}'
|
||||||
|
|
||||||
# Repository details
|
# SBo repository configs
|
||||||
repo_version: str = '15.0'
|
sbo_repo_url: str = 'http://slackbuilds.org/slackbuilds/15.0'
|
||||||
sbo_url: str = f'http://slackbuilds.org/slackbuilds/{repo_version}'
|
|
||||||
sbo_txt: str = 'SLACKBUILDS.TXT'
|
sbo_txt: str = 'SLACKBUILDS.TXT'
|
||||||
tar_suffix: str = '.tar.gz'
|
sbo_tar_suffix: str = '.tar.gz'
|
||||||
pkg_suffix: str = '.tgz'
|
sbo_repo_tag: str = '_SBo'
|
||||||
repo_tag: str = '_SBo'
|
|
||||||
|
|
||||||
# Slackware commands
|
# Slackware commands
|
||||||
installpkg: str = 'upgradepkg --install-new'
|
installpkg: str = 'upgradepkg --install-new'
|
||||||
reinstall: str = 'upgradepkg --reinstall'
|
reinstall: str = 'upgradepkg --reinstall'
|
||||||
removepkg: str = 'removepkg'
|
removepkg: str = 'removepkg'
|
||||||
|
|
||||||
# Other configs
|
# Cli menu colors configs
|
||||||
colors: str = 'on'
|
colors: str = 'on'
|
||||||
|
|
||||||
|
# Wget options
|
||||||
wget_options = '-c -N'
|
wget_options = '-c -N'
|
||||||
|
|
||||||
# Creating the build path
|
# Creating the build path
|
||||||
|
@ -60,6 +60,7 @@ class Configs:
|
||||||
configs = yaml.safe_load(conf)
|
configs = yaml.safe_load(conf)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
config = configs['configs']
|
config = configs['configs']
|
||||||
|
|
||||||
# OS architecture by default
|
# OS architecture by default
|
||||||
|
@ -79,22 +80,23 @@ class Configs:
|
||||||
# Database name
|
# Database name
|
||||||
database: str = config['database']
|
database: str = config['database']
|
||||||
|
|
||||||
# Repository details
|
# SBo repository details
|
||||||
repo_version: str = config['repo_version']
|
sbo_repo_url: str = config['sbo_repo_url']
|
||||||
sbo_url: str = config['sbo_url']
|
|
||||||
sbo_txt: str = config['sbo_txt']
|
sbo_txt: str = config['sbo_txt']
|
||||||
tar_suffix: str = config['tar_suffix']
|
sbo_tar_suffix: str = config['sbo_tar_suffix']
|
||||||
pkg_suffix: str = config['pkg_suffix']
|
sbo_repo_tag: str = config['sbo_repo_tag']
|
||||||
repo_tag: str = config['repo_tag']
|
|
||||||
|
|
||||||
# Slackware commands
|
# Slackware commands
|
||||||
installpkg: str = config['installpkg']
|
installpkg: str = config['installpkg']
|
||||||
reinstall: str = config['reinstall']
|
reinstall: str = config['reinstall']
|
||||||
removepkg: str = config['removepkg']
|
removepkg: str = config['removepkg']
|
||||||
|
|
||||||
# Other configs
|
# Cli menu colors configs
|
||||||
colors: str = config['colors']
|
colors: str = config['colors']
|
||||||
|
|
||||||
|
# Wget options
|
||||||
wget_options: str = config['wget_options']
|
wget_options: str = config['wget_options']
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -20,19 +20,19 @@ class CreateData:
|
||||||
|
|
||||||
def insert_sbo_table(self):
|
def insert_sbo_table(self):
|
||||||
sbo_tags = [
|
sbo_tags = [
|
||||||
"SLACKBUILD NAME:",
|
'SLACKBUILD NAME:',
|
||||||
"SLACKBUILD LOCATION:",
|
'SLACKBUILD LOCATION:',
|
||||||
"SLACKBUILD FILES:",
|
'SLACKBUILD FILES:',
|
||||||
"SLACKBUILD VERSION:",
|
'SLACKBUILD VERSION:',
|
||||||
"SLACKBUILD DOWNLOAD:",
|
'SLACKBUILD DOWNLOAD:',
|
||||||
"SLACKBUILD DOWNLOAD_x86_64:",
|
'SLACKBUILD DOWNLOAD_x86_64:',
|
||||||
"SLACKBUILD MD5SUM:",
|
'SLACKBUILD MD5SUM:',
|
||||||
"SLACKBUILD MD5SUM_x86_64:",
|
'SLACKBUILD MD5SUM_x86_64:',
|
||||||
"SLACKBUILD REQUIRES:",
|
'SLACKBUILD REQUIRES:',
|
||||||
"SLACKBUILD SHORT DESCRIPTION:"
|
'SLACKBUILD SHORT DESCRIPTION:'
|
||||||
]
|
]
|
||||||
|
|
||||||
sbo_file = self.read_file(f"{self.sbo_repo_path}/SLACKBUILDS.TXT")
|
sbo_file = self.read_file(f'{self.sbo_repo_path}/SLACKBUILDS.TXT')
|
||||||
|
|
||||||
cache = [] # init cache
|
cache = [] # init cache
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class CreateData:
|
||||||
|
|
||||||
for tag in sbo_tags:
|
for tag in sbo_tags:
|
||||||
if line.startswith(tag):
|
if line.startswith(tag):
|
||||||
line = line.replace(tag, "").strip()
|
line = line.replace(tag, '').strip()
|
||||||
cache.append(line)
|
cache.append(line)
|
||||||
|
|
||||||
if (i % 11) == 0:
|
if (i % 11) == 0:
|
||||||
|
@ -60,5 +60,5 @@ class CreateData:
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
|
|
||||||
def read_file(self, file: str):
|
def read_file(self, file: str):
|
||||||
with open(file, "r", encoding="utf-8") as f:
|
with open(file, 'r', encoding='utf-8') as f:
|
||||||
return f.readlines()
|
return f.readlines()
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Requires:
|
||||||
requires = SBoQueries(self.name).requires()
|
requires = SBoQueries(self.name).requires()
|
||||||
|
|
||||||
for req in requires:
|
for req in requires:
|
||||||
if req and req != "%README%":
|
if req and req != '%README%':
|
||||||
sub = SBoQueries(req).requires()
|
sub = SBoQueries(req).requires()
|
||||||
for s in sub:
|
for s in sub:
|
||||||
requires.append(s)
|
requires.append(s)
|
||||||
|
|
|
@ -16,8 +16,8 @@ class Download:
|
||||||
flags: list
|
flags: list
|
||||||
session: str = Session
|
session: str = Session
|
||||||
download_only = Configs.download_only
|
download_only = Configs.download_only
|
||||||
sbo_url: str = Configs.sbo_url
|
sbo_repo_url: str = Configs.sbo_repo_url
|
||||||
tar_suffix: str = Configs.tar_suffix
|
sbo_tar_suffix: str = Configs.sbo_tar_suffix
|
||||||
|
|
||||||
def packages(self, slackbuilds: list):
|
def packages(self, slackbuilds: list):
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ class Download:
|
||||||
wget = Wget()
|
wget = Wget()
|
||||||
|
|
||||||
for sbo in slackbuilds:
|
for sbo in slackbuilds:
|
||||||
file = f'{sbo}{self.tar_suffix}'
|
file = f'{sbo}{self.sbo_tar_suffix}'
|
||||||
location = SBoQueries(sbo).location()
|
location = SBoQueries(sbo).location()
|
||||||
url = f'{self.sbo_url}/{location}/{file}'
|
url = f'{self.sbo_repo_url}/{location}/{file}'
|
||||||
|
|
||||||
wget.download(self.download_only, url)
|
wget.download(self.download_only, url)
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ from slpkg.configs import Configs
|
||||||
class FindInstalled:
|
class FindInstalled:
|
||||||
log_packages: str = Configs.log_packages
|
log_packages: str = Configs.log_packages
|
||||||
colors: dict = Configs.colour
|
colors: dict = Configs.colour
|
||||||
repo_tag: str = Configs.repo_tag
|
sbo_repo_tag: str = Configs.sbo_repo_tag
|
||||||
|
|
||||||
def find(self, packages: list):
|
def find(self, packages: list):
|
||||||
matching = []
|
matching = []
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
for package in os.listdir(self.log_packages):
|
for package in os.listdir(self.log_packages):
|
||||||
if pkg in package and self.repo_tag in package:
|
if pkg in package and self.sbo_repo_tag in package:
|
||||||
matching.append(package)
|
matching.append(package)
|
||||||
self.matched(matching)
|
self.matched(matching)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
import urllib3
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from slpkg.configs import Configs
|
from slpkg.configs import Configs
|
||||||
|
@ -13,9 +14,10 @@ from slpkg.models.models import session as Session
|
||||||
class Search:
|
class Search:
|
||||||
session: str = Session
|
session: str = Session
|
||||||
colors: dict = Configs.colour
|
colors: dict = Configs.colour
|
||||||
sbo_url: str = Configs.sbo_url
|
sbo_repo_url: str = Configs.sbo_repo_url
|
||||||
|
|
||||||
def package(self, packages):
|
def package(self, packages):
|
||||||
|
http = urllib3.PoolManager()
|
||||||
color = self.colors()
|
color = self.colors()
|
||||||
GREEN = color['GREEN']
|
GREEN = color['GREEN']
|
||||||
BLUE = color['BLUE']
|
BLUE = color['BLUE']
|
||||||
|
@ -36,6 +38,9 @@ class Search:
|
||||||
SBoTable.location
|
SBoTable.location
|
||||||
).filter(SBoTable.name == package).first()
|
).filter(SBoTable.name == package).first()
|
||||||
|
|
||||||
|
readme = http.request(
|
||||||
|
'GET', f'{self.sbo_repo_url}/{info[9]}/{info[0]}/README')
|
||||||
|
|
||||||
print(f'Name: {GREEN}{info[0]}{ENDC}\n'
|
print(f'Name: {GREEN}{info[0]}{ENDC}\n'
|
||||||
f'Version: {GREEN}{info[1]}{ENDC}\n'
|
f'Version: {GREEN}{info[1]}{ENDC}\n'
|
||||||
f'Requires: {GREEN}{info[2]}{ENDC}\n'
|
f'Requires: {GREEN}{info[2]}{ENDC}\n'
|
||||||
|
@ -45,5 +50,5 @@ class Search:
|
||||||
f'Md5sum_x86_64: {YELLOW}{info[6]}{ENDC}\n'
|
f'Md5sum_x86_64: {YELLOW}{info[6]}{ENDC}\n'
|
||||||
f'Files: {GREEN}{info[7]}{ENDC}\n'
|
f'Files: {GREEN}{info[7]}{ENDC}\n'
|
||||||
f'Description: {GREEN}{info[8]}{ENDC}\n'
|
f'Description: {GREEN}{info[8]}{ENDC}\n'
|
||||||
f'SBo url: {BLUE}{self.sbo_url}/{info[9]}/'
|
f'SBo url: {BLUE}{self.sbo_repo_url}/{info[9]}/{info[0]}{ENDC}\n'
|
||||||
f'{info[0]}{ENDC}\n')
|
f'README: {readme.data.decode()}')
|
||||||
|
|
|
@ -28,13 +28,11 @@ class Slackbuilds:
|
||||||
session: str = Session
|
session: str = Session
|
||||||
utils: str = Utilities()
|
utils: str = Utilities()
|
||||||
build_path: str = Configs.build_path
|
build_path: str = Configs.build_path
|
||||||
sbo_url: str = Configs.sbo_url
|
sbo_repo_url: str = Configs.sbo_repo_url
|
||||||
build_path: str = Configs.build_path
|
build_path: str = Configs.build_path
|
||||||
tmp_slpkg: str = Configs.tmp_slpkg
|
tmp_slpkg: str = Configs.tmp_slpkg
|
||||||
tmp_path: str = Configs.tmp_path
|
tmp_path: str = Configs.tmp_path
|
||||||
tar_suffix: str = Configs.tar_suffix
|
sbo_tar_suffix: str = Configs.sbo_tar_suffix
|
||||||
repo_tag: str = Configs.repo_tag
|
|
||||||
pkg_suffix: str = Configs.pkg_suffix
|
|
||||||
installpkg: str = Configs.installpkg
|
installpkg: str = Configs.installpkg
|
||||||
reinstall: str = Configs.reinstall
|
reinstall: str = Configs.reinstall
|
||||||
|
|
||||||
|
@ -98,13 +96,13 @@ class Slackbuilds:
|
||||||
wget = Wget()
|
wget = Wget()
|
||||||
|
|
||||||
for sbo in self.install_order:
|
for sbo in self.install_order:
|
||||||
file = f'{sbo}{self.tar_suffix}'
|
file = f'{sbo}{self.sbo_tar_suffix}'
|
||||||
|
|
||||||
self.utils.remove_file_if_exists(self.tmp_slpkg, file)
|
self.utils.remove_file_if_exists(self.tmp_slpkg, file)
|
||||||
self.utils.remove_folder_if_exists(self.build_path, sbo)
|
self.utils.remove_folder_if_exists(self.build_path, sbo)
|
||||||
|
|
||||||
location = SBoQueries(sbo).location()
|
location = SBoQueries(sbo).location()
|
||||||
url = f'{self.sbo_url}/{location}/{file}'
|
url = f'{self.sbo_repo_url}/{location}/{file}'
|
||||||
|
|
||||||
wget.download(self.tmp_slpkg, url)
|
wget.download(self.tmp_slpkg, url)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ from slpkg.models.models import session as Session
|
||||||
class UpdateRepository:
|
class UpdateRepository:
|
||||||
''' Deletes and install the data. '''
|
''' Deletes and install the data. '''
|
||||||
sbo_repo_path: str = Configs.sbo_repo_path
|
sbo_repo_path: str = Configs.sbo_repo_path
|
||||||
url: str = Configs.sbo_url
|
url: str = Configs.sbo_repo_url
|
||||||
sbo_txt: str = Configs.sbo_txt
|
sbo_txt: str = Configs.sbo_txt
|
||||||
db_path: str = Configs.db_path
|
db_path: str = Configs.db_path
|
||||||
database: str = Configs.database
|
database: str = Configs.database
|
||||||
|
@ -29,10 +29,10 @@ class UpdateRepository:
|
||||||
self.delete_file(self.sbo_repo_path, self.sbo_txt)
|
self.delete_file(self.sbo_repo_path, self.sbo_txt)
|
||||||
self.delete_sbo_data()
|
self.delete_sbo_data()
|
||||||
|
|
||||||
sbo_url = f'{self.url}/{self.sbo_txt}'
|
sbo_repo_url = f'{self.url}/{self.sbo_txt}'
|
||||||
|
|
||||||
wget = Wget()
|
wget = Wget()
|
||||||
wget.download(self.sbo_repo_path, sbo_url)
|
wget.download(self.sbo_repo_path, sbo_repo_url)
|
||||||
|
|
||||||
data = CreateData()
|
data = CreateData()
|
||||||
data.insert_sbo_table()
|
data.insert_sbo_table()
|
||||||
|
|
|
@ -12,12 +12,12 @@ from slpkg.queries import SBoQueries
|
||||||
@dataclass
|
@dataclass
|
||||||
class Upgrade:
|
class Upgrade:
|
||||||
log_packages: str = Configs.log_packages
|
log_packages: str = Configs.log_packages
|
||||||
repo_tag: str = Configs.repo_tag
|
sbo_repo_tag: str = Configs.sbo_repo_tag
|
||||||
|
|
||||||
def packages(self):
|
def packages(self):
|
||||||
''' Compares version of packages and returns the maximum. '''
|
''' Compares version of packages and returns the maximum. '''
|
||||||
for pkg in os.listdir(self.log_packages):
|
for pkg in os.listdir(self.log_packages):
|
||||||
if pkg.endswith(self.repo_tag):
|
if pkg.endswith(self.sbo_repo_tag):
|
||||||
name = '-'.join(pkg.split('-')[:-3])
|
name = '-'.join(pkg.split('-')[:-3])
|
||||||
installed_ver = pkg.replace(name + '-', '').split('-')[0]
|
installed_ver = pkg.replace(name + '-', '').split('-')[0]
|
||||||
repo_ver = SBoQueries(name).version()
|
repo_ver = SBoQueries(name).version()
|
||||||
|
|
|
@ -10,7 +10,7 @@ from slpkg.configs import Configs
|
||||||
@dataclass
|
@dataclass
|
||||||
class Version:
|
class Version:
|
||||||
prog_name: str = Configs.prog_name
|
prog_name: str = Configs.prog_name
|
||||||
version_info: tuple = (4, 2, 0)
|
version_info: tuple = (4, 2, 1)
|
||||||
version: str = '{0}.{1}.{2}'.format(*version_info)
|
version: str = '{0}.{1}.{2}'.format(*version_info)
|
||||||
license: str = 'MIT License'
|
license: str = 'MIT License'
|
||||||
author: str = 'dslackw'
|
author: str = 'dslackw'
|
||||||
|
|
|
@ -17,7 +17,7 @@ class ViewMessage:
|
||||||
flags: list
|
flags: list
|
||||||
colors: dict = Configs.colour
|
colors: dict = Configs.colour
|
||||||
log_packages: str = Configs.log_packages
|
log_packages: str = Configs.log_packages
|
||||||
repo_tag: str = Configs.repo_tag
|
sbo_repo_tag: str = Configs.sbo_repo_tag
|
||||||
arch: str = Configs.os_arch
|
arch: str = Configs.os_arch
|
||||||
session: str = Session
|
session: str = Session
|
||||||
utils: str = Utilities()
|
utils: str = Utilities()
|
||||||
|
@ -131,7 +131,7 @@ class ViewMessage:
|
||||||
|
|
||||||
for package in installed:
|
for package in installed:
|
||||||
black = package.split('-')[0]
|
black = package.split('-')[0]
|
||||||
if (package.startswith(name) and self.repo_tag in package and
|
if (package.startswith(name) and self.sbo_repo_tag in package and
|
||||||
black not in self.black.get()):
|
black not in self.black.get()):
|
||||||
self.installed_packages.append(package)
|
self.installed_packages.append(package)
|
||||||
print(f'[{color["RED"]} delete {color["ENDC"]}] -> {package}')
|
print(f'[{color["RED"]} delete {color["ENDC"]}] -> {package}')
|
||||||
|
|
|
@ -5,27 +5,19 @@ from slpkg.configs import Configs
|
||||||
class TestConfigs(unittest.TestCase):
|
class TestConfigs(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.repo_version = Configs.repo_version
|
|
||||||
self.sbo_txt = Configs.sbo_txt
|
self.sbo_txt = Configs.sbo_txt
|
||||||
self.tar_suffix = Configs.tar_suffix
|
self.sbo_tar_suffix = Configs.sbo_tar_suffix
|
||||||
self.pkg_suffix = Configs.pkg_suffix
|
self.sbo_repo_tag = Configs.sbo_repo_tag
|
||||||
self.repo_tag = Configs.repo_tag
|
|
||||||
self.os_arch = Configs.os_arch
|
self.os_arch = Configs.os_arch
|
||||||
|
|
||||||
def test_repo_version(self):
|
|
||||||
self.assertEqual(15.0, self.repo_version)
|
|
||||||
|
|
||||||
def test_sbo_txt(self):
|
def test_sbo_txt(self):
|
||||||
self.assertEqual('SLACKBUILDS.TXT', self.sbo_txt)
|
self.assertEqual('SLACKBUILDS.TXT', self.sbo_txt)
|
||||||
|
|
||||||
def test_tar_suffix(self):
|
def test_tar_suffix(self):
|
||||||
self.assertEqual('.tar.gz', self.tar_suffix)
|
self.assertEqual('.tar.gz', self.sbo_tar_suffix)
|
||||||
|
|
||||||
def test_pkg_suffix(self):
|
|
||||||
self.assertEqual('.tgz', self.pkg_suffix)
|
|
||||||
|
|
||||||
def test_repo_tag(self):
|
def test_repo_tag(self):
|
||||||
self.assertEqual('_SBo', self.repo_tag)
|
self.assertEqual('_SBo', self.sbo_repo_tag)
|
||||||
|
|
||||||
def test_os_arch(self):
|
def test_os_arch(self):
|
||||||
self.assertEqual('x86_64', self.os_arch)
|
self.assertEqual('x86_64', self.os_arch)
|
||||||
|
|
Loading…
Reference in a new issue