From 5ef57d6ff032ef64d35a2ea22296ee04624a98ff Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 27 Nov 2014 22:10:05 +0100
Subject: [PATCH] fixup! build: Remove downloaded files at the end.

---
 CHANGES.txt                     | 5 +++++
 setup.py                        | 2 +-
 slapos/recipe/build/__init__.py | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 9f7fde9..ec55fa9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,11 @@
 Changes
 =======
 
+0.15 (2014-11-28)
+-----------------
+
+ * build: Fixup! Remove downloaded files at the end.
+
 0.14 (2014-10-23)
 -----------------
 
diff --git a/setup.py b/setup.py
index b85c5e0..a1d91f5 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = '0.14'
+version = '0.15'
 name = 'slapos.recipe.build'
 long_description = open("README.rst").read() + "\n" + \
     open("CHANGES.txt").read() + "\n"
diff --git a/slapos/recipe/build/__init__.py b/slapos/recipe/build/__init__.py
index 48381d9..b31a886 100644
--- a/slapos/recipe/build/__init__.py
+++ b/slapos/recipe/build/__init__.py
@@ -188,7 +188,8 @@ class Script:
     download = zc.buildout.download.Download(self.buildout['buildout'],
         hash_name=True, cache=self.buildout['buildout'].get('download-cache'))
     path, is_temp = download(url, md5sum=md5sum)
-    self.cleanup_file_list.append(path)
+    if is_temp:
+      self.cleanup_file_list.append(path)
     return path
 
   def extract(self, path):
-- 
2.30.9