Updated for sources

This commit is contained in:
Dimitris Zlatanidis 2022-12-22 23:26:48 +02:00
parent 0e89183985
commit 619b282a45
3 changed files with 7 additions and 6 deletions

View file

@ -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)

View file

@ -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. """

View file

@ -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)