[gnome-ostree] build: Ensure any old half-constructed buildroots are deleted
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: Ensure any old half-constructed buildroots are deleted
- Date: Sat, 13 Oct 2012 14:49:38 +0000 (UTC)
commit 7ee10ae5139c8b138797e151dc6a190b09eafe0c
Author: Colin Walters <walters verbum org>
Date: Sat Oct 13 10:48:18 2012 -0400
build: Ensure any old half-constructed buildroots are deleted
We don't want to append to stale previous attempts.
src/ostbuild/pyostbuild/builtin_build.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index 4bd9b17..621ce1d 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -114,7 +114,6 @@ class OstbuildBuild(builtins.Builtin):
new_root_cacheid = sha.hexdigest()
cached_root = os.path.join(buildroot_cachedir, new_root_cacheid)
- cached_root_tmp = cached_root + '.tmp'
if os.path.isdir(cached_root):
log("Reusing cached buildroot: %s" % (cached_root, ))
os.unlink(tmppath)
@@ -124,6 +123,9 @@ class OstbuildBuild(builtins.Builtin):
log("composing buildroot from %d parents (last: %r)" % (len(checkout_trees),
checkout_trees[-1][0]))
+ cached_root_tmp = cached_root + '.tmp'
+ if os.path.isdir(cached_root_tmp):
+ shutil.rmtree(cached_root_tmp)
run_sync(['ostree', '--repo=' + self.repo,
'checkout', '--user-mode', '--union',
'--from-file=' + tmppath, cached_root_tmp])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]