aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/models.py
diff options
context:
space:
mode:
authorAmanda Brindle <amanda.r.brindle@intel.com>2017-12-15 13:06:53 -0800
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-12-18 09:01:29 +1300
commit51e83c8d31449eb314a9d7e93545f78de2898d87 (patch)
tree26ea280d2b70c2267032ec418a75cc288331b151 /layerindex/models.py
parenta64bfed81b3827503ff825090f1fb4b94e1cd9bd (diff)
downloadopenembedded-core-contrib-51e83c8d31449eb314a9d7e93545f78de2898d87.tar.gz
update_layer.py: Save and show recipe dependencies
Added a model for the PACKAGECONFIG variable, which has a one to many relationship with the Recipe model. Added models for static build dependencies and dynamic build dependencies, both of which have a many to many relationship with the Recipe model. These objects are created in update_layer.py and are displayed on the Recipe detail page. Added a depends search option for recipes, allowing users to search for recipes that depend on any particular recipe. Use "depends:recipename" in the recipe search to activate this. Fixes [YOCTO #12129] Fixes [YOCTO #11415] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/models.py')
-rw-r--r--layerindex/models.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/layerindex/models.py b/layerindex/models.py
index b39518a316..6fdef041a3 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -357,6 +357,30 @@ class Recipe(models.Model):
def __str__(self):
return os.path.join(self.filepath, self.filename)
+class PackageConfig(models.Model):
+ recipe = models.ForeignKey(Recipe)
+ feature = models.CharField(max_length=255)
+ with_option = models.CharField(max_length=255, blank=True)
+ without_option = models.CharField(max_length=255, blank=True)
+ build_deps = models.CharField(max_length=255, blank=True)
+
+ def __str__(self):
+ return "%s - %s" % (self.recipe, self.feature)
+
+class StaticBuildDep(models.Model):
+ recipes = models.ManyToManyField(Recipe)
+ name = models.CharField(max_length=255)
+
+ def __str__(self):
+ return self.name
+
+class DynamicBuildDep(models.Model):
+ package_configs = models.ManyToManyField(PackageConfig)
+ recipes = models.ManyToManyField(Recipe)
+ name = models.CharField(max_length=255)
+
+ def __str__(self):
+ return self.name
class RecipeFileDependency(models.Model):
recipe = models.ForeignKey(Recipe)