From 619b282a453a06a3b18c1fc620b9663b5ed31b20 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 22 Dec 2022 23:26:48 +0200 Subject: [PATCH] Updated for sources --- slpkg/download_only.py | 2 +- slpkg/queries.py | 7 ++++--- slpkg/slackbuild.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/slpkg/download_only.py b/slpkg/download_only.py index 333ee0e3..e30ac419 100644 --- a/slpkg/download_only.py +++ b/slpkg/download_only.py @@ -32,5 +32,5 @@ class Download: wget.download(self.configs.download_only, url) sources = SBoQueries(sbo).sources() - for source in sources.split(): + for source in sources: wget.download(self.configs.download_only, source) diff --git a/slpkg/queries.py b/slpkg/queries.py index 95a513d3..32216dd2 100644 --- a/slpkg/queries.py +++ b/slpkg/queries.py @@ -49,9 +49,10 @@ class SBoQueries: SBoTable.download, SBoTable.download64).filter( SBoTable.name == self.name).first() - if source or source64: - return self._chose_arch(source, source64) - return '' + if self.configs.os_arch == 'x86_64' and source64: + return source64.split() + + return source.split() def requires(self) -> str: """ Returns the requirements of a slackbuild. """ diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index 9fc62872..c2ebde21 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -200,7 +200,7 @@ class Slackbuilds: cpus = multiprocessing.cpu_count() os.environ['MAKEFLAGS'] = f'-j {cpus}' - def download_sources(self, name: str, sources: str): + def download_sources(self, name: str, sources: list): """ Download the sources. """ wget = Wget() @@ -208,7 +208,7 @@ class Slackbuilds: checksums = SBoQueries(name).checksum() - for source, checksum in zip(sources.split(), checksums): + for source, checksum in zip(sources, checksums): wget.download(path, source) md5sum = Md5sum(self.flags) md5sum.check(path, source, checksum, name)