mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated for typing
This commit is contained in:
parent
0e32a04911
commit
d5fb22f22f
1 changed files with 4 additions and 5 deletions
|
@ -105,8 +105,7 @@ class Slackbuilds(Configs):
|
||||||
self.dependencies.append(dependency)
|
self.dependencies.append(dependency)
|
||||||
|
|
||||||
def remove_duplicate_from_dependencies_list(self) -> None:
|
def remove_duplicate_from_dependencies_list(self) -> None:
|
||||||
if self.dependencies:
|
self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
|
||||||
self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
|
|
||||||
|
|
||||||
def add_dependencies_to_install_order(self) -> None:
|
def add_dependencies_to_install_order(self) -> None:
|
||||||
self.install_order.extend(self.dependencies)
|
self.install_order.extend(self.dependencies)
|
||||||
|
@ -153,10 +152,10 @@ class Slackbuilds(Configs):
|
||||||
|
|
||||||
self.utils.remove_folder_if_exists(build_path)
|
self.utils.remove_folder_if_exists(build_path)
|
||||||
location: str = self.data[sbo]['location']
|
location: str = self.data[sbo]['location']
|
||||||
slackbuild = Path(self.build_path, sbo, f'{sbo}.SlackBuild')
|
slackbuild: Path = Path(self.build_path, sbo, f'{sbo}.SlackBuild')
|
||||||
|
|
||||||
# Copy slackbuilds to the build folder.
|
# Copy slackbuilds to the build folder.
|
||||||
path_repo_package = Path(self.repos.repositories[self.repository]['path'], location, sbo)
|
path_repo_package: Path = Path(self.repos.repositories[self.repository]['path'], location, sbo)
|
||||||
shutil.copytree(path_repo_package, build_path)
|
shutil.copytree(path_repo_package, build_path)
|
||||||
|
|
||||||
os.chmod(slackbuild, 0o775)
|
os.chmod(slackbuild, 0o775)
|
||||||
|
@ -177,7 +176,7 @@ class Slackbuilds(Configs):
|
||||||
|
|
||||||
def checksum_downloaded_sources(self) -> None:
|
def checksum_downloaded_sources(self) -> None:
|
||||||
for sbo in self.install_order:
|
for sbo in self.install_order:
|
||||||
path = Path(self.build_path, sbo)
|
path: Path = Path(self.build_path, sbo)
|
||||||
|
|
||||||
if self.os_arch == 'x86_64' and self.data[sbo]['md5sum64']:
|
if self.os_arch == 'x86_64' and self.data[sbo]['md5sum64']:
|
||||||
checksums: list = self.data[sbo]['md5sum64'].split()
|
checksums: list = self.data[sbo]['md5sum64'].split()
|
||||||
|
|
Loading…
Add table
Reference in a new issue