diff options
Diffstat (limited to 'bitbake/lib/bblayers/query.py')
| -rw-r--r-- | bitbake/lib/bblayers/query.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py index 9142ec4474..afd39518e5 100644 --- a/bitbake/lib/bblayers/query.py +++ b/bitbake/lib/bblayers/query.py | |||
| @@ -57,11 +57,12 @@ are overlayed will also be listed, with a " (skipped)" suffix. | |||
| 57 | # Check for overlayed .bbclass files | 57 | # Check for overlayed .bbclass files |
| 58 | classes = collections.defaultdict(list) | 58 | classes = collections.defaultdict(list) |
| 59 | for layerdir in self.bblayers: | 59 | for layerdir in self.bblayers: |
| 60 | classdir = os.path.join(layerdir, 'classes') | 60 | for c in ["classes-global", "classes-recipe", "classes"]: |
| 61 | if os.path.exists(classdir): | 61 | classdir = os.path.join(layerdir, c) |
| 62 | for classfile in os.listdir(classdir): | 62 | if os.path.exists(classdir): |
| 63 | if os.path.splitext(classfile)[1] == '.bbclass': | 63 | for classfile in os.listdir(classdir): |
| 64 | classes[classfile].append(classdir) | 64 | if os.path.splitext(classfile)[1] == '.bbclass': |
| 65 | classes[classfile].append(classdir) | ||
| 65 | 66 | ||
| 66 | # Locating classes and other files is a bit more complicated than recipes - | 67 | # Locating classes and other files is a bit more complicated than recipes - |
| 67 | # layer priority is not a factor; instead BitBake uses the first matching | 68 | # layer priority is not a factor; instead BitBake uses the first matching |
| @@ -124,9 +125,14 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
| 124 | if inherits: | 125 | if inherits: |
| 125 | bbpath = str(self.tinfoil.config_data.getVar('BBPATH')) | 126 | bbpath = str(self.tinfoil.config_data.getVar('BBPATH')) |
| 126 | for classname in inherits: | 127 | for classname in inherits: |
| 127 | classfile = 'classes/%s.bbclass' % classname | 128 | found = False |
| 128 | if not bb.utils.which(bbpath, classfile, history=False): | 129 | for c in ["classes-global", "classes-recipe", "classes"]: |
| 129 | logger.error('No class named %s found in BBPATH', classfile) | 130 | cfile = c + '/%s.bbclass' % classname |
| 131 | if bb.utils.which(bbpath, cfile, history=False): | ||
| 132 | found = True | ||
| 133 | break | ||
| 134 | if not found: | ||
| 135 | logger.error('No class named %s found in BBPATH', classname) | ||
| 130 | sys.exit(1) | 136 | sys.exit(1) |
| 131 | 137 | ||
| 132 | pkg_pn = self.tinfoil.cooker.recipecaches[mc].pkg_pn | 138 | pkg_pn = self.tinfoil.cooker.recipecaches[mc].pkg_pn |
| @@ -174,7 +180,7 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
| 174 | logger.plain(" %s %s%s", layer.ljust(20), ver, skipped) | 180 | logger.plain(" %s %s%s", layer.ljust(20), ver, skipped) |
| 175 | 181 | ||
| 176 | global_inherit = (self.tinfoil.config_data.getVar('INHERIT') or "").split() | 182 | global_inherit = (self.tinfoil.config_data.getVar('INHERIT') or "").split() |
| 177 | cls_re = re.compile('classes/') | 183 | cls_re = re.compile('classes.*/') |
| 178 | 184 | ||
| 179 | preffiles = [] | 185 | preffiles = [] |
| 180 | show_unique_pn = [] | 186 | show_unique_pn = [] |
| @@ -407,7 +413,7 @@ NOTE: .bbappend files can impact the dependencies. | |||
| 407 | self.check_cross_depends("RRECOMMENDS", layername, f, best, args.filenames, ignore_layers) | 413 | self.check_cross_depends("RRECOMMENDS", layername, f, best, args.filenames, ignore_layers) |
| 408 | 414 | ||
| 409 | # The inherit class | 415 | # The inherit class |
| 410 | cls_re = re.compile('classes/') | 416 | cls_re = re.compile('classes.*/') |
| 411 | if f in self.tinfoil.cooker_data.inherits: | 417 | if f in self.tinfoil.cooker_data.inherits: |
| 412 | inherits = self.tinfoil.cooker_data.inherits[f] | 418 | inherits = self.tinfoil.cooker_data.inherits[f] |
| 413 | for cls in inherits: | 419 | for cls in inherits: |
