diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-03-09 19:48:35 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-03-09 20:58:24 +0000 |
commit | cd26148eed9cfd27ec42835e4ca54871c0c2bf24 (patch) | |
tree | c7ed87541a21071e92f5de3537cfccf494634ce9 /layerindex/models.py | |
parent | 4db9555a67c3a2c72849d1de1b5fb8daac06111a (diff) | |
download | openembedded-core-contrib-cd26148eed9cfd27ec42835e4ca54871c0c2bf24.tar.gz |
Fix append list name matching
* Recipes without versions in the file name (such as alsa-state.bb)
weren't having their bbappends listed. Use a regex match to fix this.
* Use the prefix from the filename instead of PN, since that's how
BitBake does it
* List version matching bbappends first, then non-matching in muted
colour
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/models.py')
-rw-r--r-- | layerindex/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layerindex/models.py b/layerindex/models.py index e1a9edda8a..ae9509ab2a 100644 --- a/layerindex/models.py +++ b/layerindex/models.py @@ -337,6 +337,16 @@ class BBAppend(models.Model): url = self.layerbranch.file_url(os.path.join(self.filepath, self.filename)) return url or '' + def matches_recipe(self, recipe): + recipename = recipe.filename[:-3] + appendname = self.filename[:-9] + if recipename == appendname: + return True + elif '%' in appendname: + import fnmatch + return fnmatch.fnmatch(recipename, appendname.replace('%', '*')) + return False + def __unicode__(self): return os.path.join(self.filepath, self.filename) |