summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/models.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-12-05 15:14:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-18 10:24:06 +0000
commitf99f2cdd69f1015953a7e9ab07af46dd63e50ad4 (patch)
treef7f13e4ef5e92f6158d405887da187ad07b5f7ec /bitbake/lib/toaster/bldcontrol/models.py
parentc467bbd841d6ef2caae7fb2693456c50584d23ec (diff)
downloadpoky-f99f2cdd69f1015953a7e9ab07af46dd63e50ad4.tar.gz
bitbake: add build artifacts table and other improvements
We add a BuildArtifacts class to store data about files discovered during the build process and not stored anywhere else. Small cosmetic changes in the toasterui. Add model methods to return file path display data relative to the build environment instead of absolute file paths. [YOCTO #6834] (Bitbake rev: bbe24d912869312d561be199b2c029b0c898e049) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/models.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index e643d08603..cab4463647 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -70,11 +70,19 @@ class BuildEnvironment(models.Model):
70 return "binary/octet-stream" 70 return "binary/octet-stream"
71 except ImportError: 71 except ImportError:
72 return "binary/octet-stream" 72 return "binary/octet-stream"
73 raise Exception("FIXME: artifact type not implemented for build environment type %s" % be.get_betype_display())
74
73 75
74 def get_artifact(self, path): 76 def get_artifact(self, path):
75 if self.betype == BuildEnvironment.TYPE_LOCAL: 77 if self.betype == BuildEnvironment.TYPE_LOCAL:
76 return open(path, "r") 78 return open(path, "r")
77 raise Exception("FIXME: not implemented") 79 raise Exception("FIXME: artifact download not implemented for build environment type %s" % be.get_betype_display())
80
81 def has_artifact(self, path):
82 import os
83 if self.betype == BuildRequest.TYPE_LOCAL:
84 return os.path.exists(path)
85 raise Exception("FIXME: has artifact not implemented for build environment type %s" % be.get_betype_display())
78 86
79# a BuildRequest is a request that the scheduler will build using a BuildEnvironment 87# a BuildRequest is a request that the scheduler will build using a BuildEnvironment
80# the build request queue is the table itself, ordered by state 88# the build request queue is the table itself, ordered by state