diff options
Diffstat (limited to 'meta/lib/bbconfigbuild/configfragments.py')
| -rw-r--r-- | meta/lib/bbconfigbuild/configfragments.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index 21baedc9a4..60cdced555 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py | |||
| @@ -97,8 +97,8 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
| 97 | print_fragment(f, args.verbose, is_enabled=False) | 97 | print_fragment(f, args.verbose, is_enabled=False) |
| 98 | print('') | 98 | print('') |
| 99 | 99 | ||
| 100 | def fragment_exists(self, fragmentname): | 100 | def fragment_exists(self, fragmentname, fragments): |
| 101 | for layername, layerdata in self.discover_fragments().items(): | 101 | for layername, layerdata in fragments.items(): |
| 102 | for f in layerdata['fragments']: | 102 | for f in layerdata['fragments']: |
| 103 | if f['name'] == fragmentname: | 103 | if f['name'] == fragmentname: |
| 104 | return True | 104 | return True |
| @@ -136,8 +136,9 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
| 136 | enabled_fragments.append(f) | 136 | enabled_fragments.append(f) |
| 137 | return " ".join(enabled_fragments), None, 0, True | 137 | return " ".join(enabled_fragments), None, 0, True |
| 138 | 138 | ||
| 139 | fragments = self.discover_fragments() | ||
| 139 | for f in args.fragmentname: | 140 | for f in args.fragmentname: |
| 140 | if not self.fragment_exists(f) and not self.builtin_fragment_exists(f): | 141 | if not self.fragment_exists(f, fragments) and not self.builtin_fragment_exists(f): |
| 141 | raise Exception("Fragment {} does not exist; use 'list-fragments' to see the full list.".format(f)) | 142 | raise Exception("Fragment {} does not exist; use 'list-fragments' to see the full list.".format(f)) |
| 142 | 143 | ||
| 143 | self.create_conf(args.confpath) | 144 | self.create_conf(args.confpath) |
