summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r--meta/lib/oeqa/utils/buildproject.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index 721f35d996..7e9b84955f 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -24,9 +24,12 @@ class BuildProject(metaclass=ABCMeta):
24 self.fname = foldername 24 self.fname = foldername
25 else: 25 else:
26 self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive) 26 self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
27 self.needclean = False
27 28
28 # Download self.archive to self.localarchive 29 # Download self.archive to self.localarchive
29 def _download_archive(self): 30 def _download_archive(self):
31
32 self.needclean = True
30 if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)): 33 if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)):
31 shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive) 34 shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive)
32 return 35 return
@@ -51,5 +54,7 @@ class BuildProject(metaclass=ABCMeta):
51 return self._run('cd %s; make install %s' % (self.targetdir, install_args)) 54 return self._run('cd %s; make install %s' % (self.targetdir, install_args))
52 55
53 def clean(self): 56 def clean(self):
57 if not self.needclean:
58 return
54 self._run('rm -rf %s' % self.targetdir) 59 self._run('rm -rf %s' % self.targetdir)
55 subprocess.check_call('rm -f %s' % self.localarchive, shell=True) 60 subprocess.check_call('rm -f %s' % self.localarchive, shell=True)