summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-11-21 09:50:41 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-24 12:25:36 +0000
commit381d5920188398bc53b2454843054c8690bca243 (patch)
tree31317a05432dcf7f287335f9ddca4451be3083de /bitbake
parentbc267ef6febb810470aeeb03e091d1a8d6c60e70 (diff)
downloadpoky-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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3295f6c822..1f494ee657 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -706,14 +706,9 @@ class BBCooker:
706 logger.info("Task dependencies saved to 'task-depends.dot'") 706 logger.info("Task dependencies saved to 'task-depends.dot'")
707 707
708 def show_appends_with_no_recipes( self ): 708 def show_appends_with_no_recipes( self ):
709 recipes = set(os.path.basename(f)
710 for f in self.recipecache.pkg_fn.iterkeys())
711 recipes |= set(os.path.basename(f)
712 for f in self.skiplist.iterkeys())
713 appended_recipes = self.collection.appendlist.iterkeys()
714 appends_without_recipes = [self.collection.appendlist[recipe] 709 appends_without_recipes = [self.collection.appendlist[recipe]
715 for recipe in appended_recipes 710 for recipe in self.collection.appendlist
716 if recipe not in recipes] 711 if recipe not in self.collection.appliedappendlist]
717 if appends_without_recipes: 712 if appends_without_recipes:
718 appendlines = (' %s' % append 713 appendlines = (' %s' % append
719 for appends in appends_without_recipes 714 for appends in appends_without_recipes
@@ -1371,6 +1366,7 @@ class CookerExit(bb.event.Event):
1371class CookerCollectFiles(object): 1366class CookerCollectFiles(object):
1372 def __init__(self, priorities): 1367 def __init__(self, priorities):
1373 self.appendlist = {} 1368 self.appendlist = {}
1369 self.appliedappendlist = []
1374 self.bbfile_config_priorities = priorities 1370 self.bbfile_config_priorities = priorities
1375 1371
1376 def calc_bbfile_priority( self, filename, matched = None ): 1372 def calc_bbfile_priority( self, filename, matched = None ):
@@ -1487,10 +1483,14 @@ class CookerCollectFiles(object):
1487 """ 1483 """
1488 Returns a list of .bbappend files to apply to fn 1484 Returns a list of .bbappend files to apply to fn
1489 """ 1485 """
1486 filelist = []
1490 f = os.path.basename(fn) 1487 f = os.path.basename(fn)
1491 if f in self.appendlist: 1488 for bbappend in self.appendlist:
1492 return self.appendlist[f] 1489 if bbappend in f or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
1493 return [] 1490 self.appliedappendlist.append(bbappend)
1491 for filename in self.appendlist[bbappend]:
1492 filelist.append(filename)
1493 return filelist
1494 1494
1495 def collection_priorities(self, pkgfns): 1495 def collection_priorities(self, pkgfns):
1496 1496