From f04877cd480f25c7fe22268e03bb6fac5d6028c8 Mon Sep 17 00:00:00 2001 From: Alexis Christoforides Date: Mon, 10 Jun 2019 13:24:34 -0400 Subject: Don't eagerly delete logs Delete logs of built packages only if they are about to get rebuilt --- bockbuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bockbuild.py b/bockbuild.py index a3b0cfe..691060b 100755 --- a/bockbuild.py +++ b/bockbuild.py @@ -194,8 +194,6 @@ class Bockbuild: self.artifact_root, '%s-%s' % (package.name, arch)) package.buildstring_file = package.build_artifact + '.buildstring' package.log = os.path.join(self.logs, package.name + '.log') - if os.path.exists(package.log): - delete(package.log) package.source_dir_name = expand_macros(package.source_dir_name, package) workspace_path = os.path.join(self.build_root, package.source_dir_name) @@ -226,6 +224,8 @@ class Bockbuild: package.deploy_requests.append (stage) for package in packages.values(): + if os.path.exists(package.log): + delete(package.log) package.start_build(arch, dest, stage) # make artifact in scratch # delete artifact + buildstring -- cgit v1.2.3