From d774f48d9ae62c41010dbd32e6cd41104c92edbc Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 29 May 2023 20:37:48 +0300 Subject: [PATCH] Fixed build --- ChangeLog.txt | 2 ++ slpkg/binaries/install.py | 3 ++- slpkg/downloader.py | 14 ++++++++------ slpkg/sbos/slackbuild.py | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 520157d8..da9b065f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,8 @@ Updated: - France manpage Fixed: - Choose dependencies for upgraded packages +- Build packages with the same source name: + (nvidia-driver and nvidia-kernel use the same source NVIDIA-Linux-x86_64-.run) 4.8.7 - 23/05/2023 Fixed: diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index b72b6cb1..7ad3a61f 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -112,8 +112,9 @@ class Packages(Configs): package: str = self.data[pkg]['package'] mirror: str = self.data[pkg]['mirror'] location: str = self.data[pkg]['location'] + url: list = [f'{mirror}{location}/{package}'] - packages[f'{mirror}{location}/{package}'] = self.tmp_slpkg + packages[pkg] = (url, self.tmp_slpkg) self.binary_packages.append(package) self.utils.remove_file_if_exists(self.tmp_slpkg, package) diff --git a/slpkg/downloader.py b/slpkg/downloader.py index fdf9a528..c4fc3d57 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -36,16 +36,18 @@ class Downloader(Configs): processes: list = [] if self.parallel_downloads or self.option_for_parallel: - for url, path in sources.items(): - proc = Process(target=self.tools, args=(url, path)) - processes.append(proc) - proc.start() + for urls, path in sources.values(): + for url in urls: + proc = Process(target=self.tools, args=(url, path)) + processes.append(proc) + proc.start() for process in processes: process.join() else: - for url, path in sources.items(): - self.tools(url, path) + for urls, path in sources.values(): + for url in urls: + self.tools(url, path) def tools(self, url: str, path: Path) -> None: url_parse: str = urlparse(url).path diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index e4d0df26..111b2675 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -166,8 +166,8 @@ class Slackbuilds(Configs): sources: list = self.data[sbo]['download64'].split() else: sources: list = self.data[sbo]['download'].split() - for source in sources: - self.sources[source] = Path(self.build_path, sbo) + + self.sources[sbo] = (sources, Path(self.build_path, sbo)) def download_the_sources(self) -> None: if self.sources: