From cac85412d757b6054436dc9c63d30db645bc93ea Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 22 Sep 2019 18:35:47 +0200 Subject: Add ArchiveArtifacts ArchiveArtifacts check a downloaded archive against a provided checksum. The Archive is downloaded to cache//.. The only suported format is tar. ArchiveArtifacts can be used as sources of an Allocator. --- src/allocator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/allocator.py') diff --git a/src/allocator.py b/src/allocator.py index 23b5147..b88b046 100644 --- a/src/allocator.py +++ b/src/allocator.py @@ -25,6 +25,7 @@ import shutil import subprocess import sys +from src.artifact import ArchiveArtifact, GitArtifact import src.globalvars from src.util import print_status, print_debug, print_error, print_info2 @@ -76,7 +77,10 @@ class Allocator: return print_status("Preparing", self.name, "...") - self.sources.provide(self.version, self.srcdir) + if type(self.sources) == GitArtifact: + self.sources.provide(self.version, self.srcdir) + elif type(self.sources) == ArchiveArtifact: + self.sources.provide(self.srcdir) if self.patches: stdout = subprocess.PIPE if src.globalvars.verbosity < 2 else None -- cgit v1.2.3