summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2024-12-20 13:41:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-23 11:43:04 +0000
commit530f439eb43ea643688b00445e1462ba2c02c267 (patch)
tree2d5b14f78f3bbbd9f734dfe8cd39a320cb7f0c05
parentfab5ce88c8509c40f6671e8cefd9ddec6f65bf01 (diff)
downloadpoky-530f439eb43ea643688b00445e1462ba2c02c267.tar.gz
lib: configfragments: Restrict fragment file checking
The current implementation of the config fragments is too aggressive in checking files; any file in the fragment directory is checked, including hidden files or files with weird extensions. In particular, if an editor is creating temporary backup files when editing, these will be checked and will almost assuredly fail, which prevents the tool from running. Add a filter so that only non-hidden files that end with .conf are checked. (From OE-Core rev: 456d90f035828dc7c9a255ed555665a8066687de) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/bbconfigbuild/configfragments.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py
index 30cc5ece07..a0c3883399 100644
--- a/meta/lib/bbconfigbuild/configfragments.py
+++ b/meta/lib/bbconfigbuild/configfragments.py
@@ -43,6 +43,8 @@ class ConfigFragmentsPlugin(LayerPlugin):
43 for topdir, dirs, files in os.walk(os.path.join(layerdir, fragments_path_prefix)): 43 for topdir, dirs, files in os.walk(os.path.join(layerdir, fragments_path_prefix)):
44 fragmentdir = os.path.relpath(topdir, os.path.join(layerdir, fragments_path_prefix)) 44 fragmentdir = os.path.relpath(topdir, os.path.join(layerdir, fragments_path_prefix))
45 for fragmentfile in sorted(files): 45 for fragmentfile in sorted(files):
46 if fragmentfile.startswith(".") or not fragmentfile.endswith(".conf"):
47 continue
46 fragmentname = os.path.normpath("/".join((layername, fragmentdir, fragmentfile.split('.')[0]))) 48 fragmentname = os.path.normpath("/".join((layername, fragmentdir, fragmentfile.split('.')[0])))
47 fragmentpath = os.path.join(topdir, fragmentfile) 49 fragmentpath = os.path.join(topdir, fragmentfile)
48 fragmentsummary, fragmentdesc = self.get_fragment_info(fragmentpath, fragmentname) 50 fragmentsummary, fragmentdesc = self.get_fragment_info(fragmentpath, fragmentname)