mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
bbconfigbuild/configfragments.py: run discover_fragments() only once when enabling them
(From OE-Core rev: f2d9519fc3aa74996654bf02d31fb6496d7a05f3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2ef4c3ac94
commit
4a6a9e2bc5
|
|
@ -97,8 +97,8 @@ class ConfigFragmentsPlugin(LayerPlugin):
|
|||
print_fragment(f, args.verbose, is_enabled=False)
|
||||
print('')
|
||||
|
||||
def fragment_exists(self, fragmentname):
|
||||
for layername, layerdata in self.discover_fragments().items():
|
||||
def fragment_exists(self, fragmentname, fragments):
|
||||
for layername, layerdata in fragments.items():
|
||||
for f in layerdata['fragments']:
|
||||
if f['name'] == fragmentname:
|
||||
return True
|
||||
|
|
@ -136,8 +136,9 @@ class ConfigFragmentsPlugin(LayerPlugin):
|
|||
enabled_fragments.append(f)
|
||||
return " ".join(enabled_fragments), None, 0, True
|
||||
|
||||
fragments = self.discover_fragments()
|
||||
for f in args.fragmentname:
|
||||
if not self.fragment_exists(f) and not self.builtin_fragment_exists(f):
|
||||
if not self.fragment_exists(f, fragments) and not self.builtin_fragment_exists(f):
|
||||
raise Exception("Fragment {} does not exist; use 'list-fragments' to see the full list.".format(f))
|
||||
|
||||
self.create_conf(args.confpath)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user