mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-07 17:24:57 +01:00
Updated for coding style
This commit is contained in:
parent
1629acd545
commit
8d0dc4ace1
4 changed files with 11 additions and 11 deletions
|
@ -7,7 +7,7 @@ from slpkg.utilities import Utilities
|
||||||
from slpkg.downloader import Downloader
|
from slpkg.downloader import Downloader
|
||||||
from slpkg.views.views import ViewMessage
|
from slpkg.views.views import ViewMessage
|
||||||
from slpkg.repositories import Repositories
|
from slpkg.repositories import Repositories
|
||||||
from slpkg.binaries.queries import BinsQueries
|
from slpkg.binaries.queries import BinQueries
|
||||||
|
|
||||||
|
|
||||||
class Packages(Configs):
|
class Packages(Configs):
|
||||||
|
@ -38,9 +38,9 @@ class Packages(Configs):
|
||||||
pkg_urls: list = []
|
pkg_urls: list = []
|
||||||
for pkg in self.packages:
|
for pkg in self.packages:
|
||||||
|
|
||||||
mirror: str = BinsQueries(pkg, self.repo).mirror()
|
mirror: str = BinQueries(pkg, self.repo).mirror()
|
||||||
location: str = BinsQueries(pkg, self.repo).location()
|
location: str = BinQueries(pkg, self.repo).location()
|
||||||
package: str = BinsQueries(pkg, self.repo).package_bin()
|
package: str = BinQueries(pkg, self.repo).package_bin()
|
||||||
|
|
||||||
pkg_urls.append(f'{mirror}{location}/{package}')
|
pkg_urls.append(f'{mirror}{location}/{package}')
|
||||||
self.binary_packages.append(package)
|
self.binary_packages.append(package)
|
||||||
|
@ -57,7 +57,7 @@ class Packages(Configs):
|
||||||
""" Packages checksums. """
|
""" Packages checksums. """
|
||||||
md5 = Md5sum(self.flags)
|
md5 = Md5sum(self.flags)
|
||||||
for package in self.binary_packages:
|
for package in self.binary_packages:
|
||||||
pkg_checksum: str = BinsQueries(package, self.repo).package_checksum()
|
pkg_checksum: str = BinQueries(package, self.repo).package_checksum()
|
||||||
md5.check(self.tmp_slpkg, package, pkg_checksum)
|
md5.check(self.tmp_slpkg, package, pkg_checksum)
|
||||||
|
|
||||||
def install_packages(self) -> None:
|
def install_packages(self) -> None:
|
||||||
|
|
|
@ -8,7 +8,7 @@ from slpkg.models.models import session as Session
|
||||||
from slpkg.models.models import BinariesTable
|
from slpkg.models.models import BinariesTable
|
||||||
|
|
||||||
|
|
||||||
class BinsQueries(Configs):
|
class BinQueries(Configs):
|
||||||
""" Queries class for the sbo repository. """
|
""" Queries class for the sbo repository. """
|
||||||
|
|
||||||
def __init__(self, name: str, repo=None):
|
def __init__(self, name: str, repo=None):
|
||||||
|
|
|
@ -10,7 +10,7 @@ from slpkg.utilities import Utilities
|
||||||
from slpkg.repositories import Repositories
|
from slpkg.repositories import Repositories
|
||||||
|
|
||||||
from slpkg.models.models import session as Session
|
from slpkg.models.models import session as Session
|
||||||
from slpkg.binaries.queries import BinsQueries
|
from slpkg.binaries.queries import BinQueries
|
||||||
|
|
||||||
from slpkg.models.models import SBoTable, PonceTable, BinariesTable
|
from slpkg.models.models import SBoTable, PonceTable, BinariesTable
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class Check(Configs):
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
|
|
||||||
if self.utils.is_option(self.flag_binary, self.flags):
|
if self.utils.is_option(self.flag_binary, self.flags):
|
||||||
if not BinsQueries(pkg, repo).package_name():
|
if not BinQueries(pkg, repo).package_name():
|
||||||
not_packages.append(pkg)
|
not_packages.append(pkg)
|
||||||
|
|
||||||
elif not SBoQueries(pkg).slackbuild():
|
elif not SBoQueries(pkg).slackbuild():
|
||||||
|
|
|
@ -11,7 +11,7 @@ from slpkg.sbos.queries import SBoQueries
|
||||||
from slpkg.utilities import Utilities
|
from slpkg.utilities import Utilities
|
||||||
from slpkg.dialog_box import DialogBox
|
from slpkg.dialog_box import DialogBox
|
||||||
from slpkg.repositories import Repositories
|
from slpkg.repositories import Repositories
|
||||||
from slpkg.binaries.queries import BinsQueries
|
from slpkg.binaries.queries import BinQueries
|
||||||
from slpkg.models.models import LogsDependencies
|
from slpkg.models.models import LogsDependencies
|
||||||
from slpkg.models.models import session as Session
|
from slpkg.models.models import session as Session
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ class ViewMessage(Configs):
|
||||||
""" Printing the main packages. """
|
""" Printing the main packages. """
|
||||||
color: str = self.red
|
color: str = self.red
|
||||||
if self.utils.is_option(self.flag_binary, self.flags):
|
if self.utils.is_option(self.flag_binary, self.flags):
|
||||||
version: str = BinsQueries(package).version()
|
version: str = BinQueries(package).version()
|
||||||
repo: str = BinsQueries(package).repository()
|
repo: str = BinQueries(package).repository()
|
||||||
else:
|
else:
|
||||||
version: str = SBoQueries(package).version()
|
version: str = SBoQueries(package).version()
|
||||||
repo: str = SBoQueries('').repo_name()
|
repo: str = SBoQueries('').repo_name()
|
||||||
|
|
Loading…
Reference in a new issue