mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Fixed for coding style
This commit is contained in:
parent
96fb9a7fcd
commit
1629acd545
2 changed files with 14 additions and 14 deletions
|
@ -27,13 +27,13 @@ class Packages(Configs):
|
|||
self.binary_packages: list = []
|
||||
self.flag_binary: list = ['-B', '--binary']
|
||||
|
||||
def execute(self):
|
||||
def execute(self) -> None:
|
||||
self.view_message.install_packages(self.packages, self.mode)
|
||||
self.view_message.question()
|
||||
self.download()
|
||||
self.install_packages()
|
||||
|
||||
def download(self):
|
||||
def download(self) -> None:
|
||||
""" Download packages from the repositories. """
|
||||
pkg_urls: list = []
|
||||
for pkg in self.packages:
|
||||
|
@ -53,14 +53,14 @@ class Packages(Configs):
|
|||
self.checksum()
|
||||
self.install_packages()
|
||||
|
||||
def checksum(self):
|
||||
def checksum(self) -> None:
|
||||
""" Packages checksums. """
|
||||
md5 = Md5sum(self.flags)
|
||||
for package in self.binary_packages:
|
||||
pkg_checksum: str = BinsQueries(package, self.repo).package_checksum()
|
||||
md5.check(self.tmp_slpkg, package, pkg_checksum)
|
||||
|
||||
def install_packages(self):
|
||||
def install_packages(self) -> None:
|
||||
""" Install the packages. """
|
||||
for package in self.binary_packages:
|
||||
command: str = f'{self.installpkg} {self.tmp_slpkg}/{package}'
|
||||
|
|
|
@ -78,8 +78,8 @@ class CreateData(Configs):
|
|||
'PACKAGE SIZE (uncompressed):',
|
||||
'PACKAGE DESCRIPTION:'
|
||||
]
|
||||
path_packages = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_packages)
|
||||
path_checksums = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_checksums)
|
||||
path_packages: Path = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_packages)
|
||||
path_checksums: Path = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_checksums)
|
||||
packages_txt: list = self.utils.read_file(path_packages)
|
||||
checksums_md5: list = self.utils.read_file(path_checksums)
|
||||
|
||||
|
@ -87,9 +87,9 @@ class CreateData(Configs):
|
|||
line = line.strip()
|
||||
|
||||
if line.endswith('.txz'):
|
||||
file = line.split('./')[1].split('/')[-1].strip()
|
||||
md5 = line.split('./')[0].strip()
|
||||
checksums_dict[file] = md5
|
||||
file: str = line.split('./')[1].split('/')[-1].strip()
|
||||
checksum: str = line.split('./')[0].strip()
|
||||
checksums_dict[file] = checksum
|
||||
|
||||
cache: list = [] # init cache
|
||||
|
||||
|
@ -164,8 +164,8 @@ class CreateData(Configs):
|
|||
'PACKAGE SIZE (uncompressed):',
|
||||
'PACKAGE DESCRIPTION:'
|
||||
]
|
||||
path_packages = Path(self.repos.conraid_repo_path, self.repos.conraid_repo_packages)
|
||||
path_checksums = Path(self.repos.conraid_repo_path, self.repos.conraid_repo_checksums)
|
||||
path_packages: Path = Path(self.repos.conraid_repo_path, self.repos.conraid_repo_packages)
|
||||
path_checksums: Path = Path(self.repos.conraid_repo_path, self.repos.conraid_repo_checksums)
|
||||
checksums_md5: list = self.utils.read_file(path_checksums)
|
||||
|
||||
packages_txt: list = self.utils.read_file(path_packages)
|
||||
|
@ -174,9 +174,9 @@ class CreateData(Configs):
|
|||
line = line.strip()
|
||||
|
||||
if line.endswith('.txz'):
|
||||
file = line.split('./')[1].split('/')[-1].strip()
|
||||
md5 = line.split('./')[0].strip()
|
||||
checksums_dict[file] = md5
|
||||
file: str = line.split('./')[1].split('/')[-1].strip()
|
||||
checksum: str = line.split('./')[0].strip()
|
||||
checksums_dict[file] = checksum
|
||||
|
||||
cache: list = []
|
||||
|
||||
|
|
Loading…
Reference in a new issue