diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-06-29 19:37:37 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-05 13:36:49 +0100 |
| commit | 07dbea44c76640ca484fbaeb00821eaf1739388d (patch) | |
| tree | 919d48a5becfcd45919ca8ab0bc8418c4f908ee2 /bitbake/lib/bb/cooker.py | |
| parent | 81545301d742caefe1e05ebe1c82aab103951220 (diff) | |
| download | poky-07dbea44c76640ca484fbaeb00821eaf1739388d.tar.gz | |
bitbake: track 'overlayed' recipes
Recipes that have been 'overlayed' (where there is a recipe in another
layer where that layer has a higher priority) are now listed within
cooker.overlayedlist for use in bitbake-layers. This is a dict with
keys of the topmost (highest priority) recipe file.
(Bitbake rev: 370fc603d79f9c34cc23b4b520b685256c23df5d)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 6d59660794..cd32dd4ca4 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -33,6 +33,7 @@ import threading | |||
| 33 | from cStringIO import StringIO | 33 | from cStringIO import StringIO |
| 34 | from contextlib import closing | 34 | from contextlib import closing |
| 35 | from functools import wraps | 35 | from functools import wraps |
| 36 | from collections import defaultdict | ||
| 36 | import bb, bb.exceptions | 37 | import bb, bb.exceptions |
| 37 | from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue | 38 | from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue |
| 38 | 39 | ||
| @@ -1060,6 +1061,18 @@ class BBCooker: | |||
| 1060 | self.appendlist[base] = [] | 1061 | self.appendlist[base] = [] |
| 1061 | self.appendlist[base].append(f) | 1062 | self.appendlist[base].append(f) |
| 1062 | 1063 | ||
| 1064 | # Find overlayed recipes | ||
| 1065 | # bbfiles will be in priority order which makes this easy | ||
| 1066 | bbfile_seen = dict() | ||
| 1067 | self.overlayed = defaultdict(list) | ||
| 1068 | for f in reversed(bbfiles): | ||
| 1069 | base = os.path.basename(f) | ||
| 1070 | if base not in bbfile_seen: | ||
| 1071 | bbfile_seen[base] = f | ||
| 1072 | else: | ||
| 1073 | topfile = bbfile_seen[base] | ||
| 1074 | self.overlayed[topfile].append(f) | ||
| 1075 | |||
| 1063 | return (bbfiles, masked) | 1076 | return (bbfiles, masked) |
| 1064 | 1077 | ||
| 1065 | def get_file_appends(self, fn): | 1078 | def get_file_appends(self, fn): |
