[Buildroot] [PATCH 1/1] utils/getdeveloperlib.py: force foward-slash for pattern matching

James Knight james.d.knight at live.com
Sun Sep 5 01:35:20 UTC 2021


Force relative file path resolution of DEVELOPERS file entries to use
forward-slash separators since pattern matching assumes forward slashes.
This is to help permit uses invoking `get-developers` on Platforms where
`os.sep` may not be a forward slash.

Signed-off-by: James Knight <james.d.knight at live.com>
---
 utils/getdeveloperlib.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
index b205817033d1d488c13e88f3b1bdbf82aa6b1224..fb8c7546d74f764468e6ffeb0d18b169aefb80d9 100644
--- a/utils/getdeveloperlib.py
+++ b/utils/getdeveloperlib.py
@@ -249,7 +249,10 @@ def parse_developers():
                 if len(dev_files) == 0:
                     print("WARNING: '%s' doesn't match any file" % fname,
                           file=sys.stderr)
-                files += [os.path.relpath(f, brpath) for f in dev_files]
+                for f in dev_files:
+                    dev_file = os.path.relpath(f, brpath)
+                    dev_file = dev_file.replace(os.sep, '/')  # force unix sep
+                    files.append(dev_file)
             elif line == "":
                 if not name:
                     continue
-- 
2.28.0.windows.1



More information about the buildroot mailing list