summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2024-12-20 13:41:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-08 12:37:20 +0000
commit9054345fb8d20bd7859a936ef96fd16c17bf1caa (patch)
treedb7e580558be53928afc15a151496ac306d634b9
parentca3213f2254064dd7e3f4f53df56e7100683128e (diff)
downloadpoky-9054345fb8d20bd7859a936ef96fd16c17bf1caa.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: 93edab0e2bccacb808421f0766d587c576c1a12b) 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)