diff options
author | Saul Wold <sgw@linux.intel.com> | 2013-11-21 09:50:41 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-24 12:25:36 +0000 |
commit | 381d5920188398bc53b2454843054c8690bca243 (patch) | |
tree | 31317a05432dcf7f287335f9ddca4451be3083de | |
parent | bc267ef6febb810470aeeb03e091d1a8d6c60e70 (diff) | |
download | ast2050-yocto-poky-381d5920188398bc53b2454843054c8690bca243.zip ast2050-yocto-poky-381d5920188398bc53b2454843054c8690bca243.tar.gz |
bitbake: cooker: add support for using % as a wildcard in bbappend filename
There has been a continuing call for supporting wildcard in bbappend
filenames. The wildcard is actually allow matching of the name and
version up to the point of encountering the %. This approach will
allow for matching of the major or major.minor.
Exampes:
busybox_1.21.1.bb
busybox_1.21.%.bbappend will match
busybox_1.2%.bbappend will also match
if we update to busybox_1.3.0.bb the above won't match, but a busybox_1.%.bb
will.
[YOCTO #5411]
(Bitbake rev: 31bc9af9cd56e7b318924869970e850993fafc5f)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/cooker.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 3295f6c..1f494ee 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -706,14 +706,9 @@ class BBCooker: logger.info("Task dependencies saved to 'task-depends.dot'") def show_appends_with_no_recipes( self ): - recipes = set(os.path.basename(f) - for f in self.recipecache.pkg_fn.iterkeys()) - recipes |= set(os.path.basename(f) - for f in self.skiplist.iterkeys()) - appended_recipes = self.collection.appendlist.iterkeys() appends_without_recipes = [self.collection.appendlist[recipe] - for recipe in appended_recipes - if recipe not in recipes] + for recipe in self.collection.appendlist + if recipe not in self.collection.appliedappendlist] if appends_without_recipes: appendlines = (' %s' % append for appends in appends_without_recipes @@ -1371,6 +1366,7 @@ class CookerExit(bb.event.Event): class CookerCollectFiles(object): def __init__(self, priorities): self.appendlist = {} + self.appliedappendlist = [] self.bbfile_config_priorities = priorities def calc_bbfile_priority( self, filename, matched = None ): @@ -1487,10 +1483,14 @@ class CookerCollectFiles(object): """ Returns a list of .bbappend files to apply to fn """ + filelist = [] f = os.path.basename(fn) - if f in self.appendlist: - return self.appendlist[f] - return [] + for bbappend in self.appendlist: + if bbappend in f or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])): + self.appliedappendlist.append(bbappend) + for filename in self.appendlist[bbappend]: + filelist.append(filename) + return filelist def collection_priorities(self, pkgfns): |