Skip to contentSkip to conversation

buildtools: fix all drivers disabled on Windows

PATCH Superseded Dmitry Kozlyuk 4 participants 5 messages Apr 15, 2021 – Apr 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buildtools: fix all drivers disabled on Windows

buildtools/list-dir-globs.py printed paths with OS directory separator, which is "/" on Unices and "\" on Windows, while Meson code always expected "/". This resulted it all drivers being disabled on Windows.

Replace "\" with "/" in script output. Forward slash is a valid, although non-default, separator on Windows, so no paths can be broken by this substitution.

Fixes 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc Juraj Linkeš <[email protected]>
---
 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/list-dir-globs.py +1 -1
index 911e267335..d824360d39 100755
@@ -17,4 +17,4 @@
     if path:
         for p in iglob(os.path.join(root, path)):
             if os.path.isdir(p):
-                print(os.path.relpath(p))
+                print(os.path.relpath(p).replace('\\', '/'))
Signature · 1 line
2.29.3
#1 lore raw
Quoted 14 lines

-----Original Message-----
From: Dmitry Kozlyuk <[email protected]>
Sent: Thursday, April 15, 2021 11:36 PM
To: [email protected]
Cc: Dmitry Kozlyuk <[email protected]>; Juraj Linkeš <[email protected]>; Bruce Richardson <[email protected]>
Subject: [PATCH] buildtools: fix all drivers disabled on Windows

buildtools/list-dir-globs.py printed paths with OS directory separator, which is "/" on Unices and "\" on Windows, while Meson code always expected "/". This resulted it all drivers being disabled on Windows.

Quoted 5 lines

Replace "\" with "/" in script output. Forward slash is a valid, although non- default, separator on Windows, so no paths can be broken by this substitution.

Fixes 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc Juraj Linkeš <[email protected]>

This patch was only the latest that changed the code if the file, but not the logic related to path separators. I think you patch fixes the original commit ab9407c3addd.

Quoted 19 lines
---
 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/list-dir-globs.py index renamed from buildtools/list-dir-globs.py +0 -0

911e267335..d824360d39 100755

buildtools/list-dir-globs.py +1 -2
@@ -17,4 +17,4 @@
     if path:
         for p in iglob(os.path.join(root, path)):
             if os.path.isdir(p):
-                print(os.path.relpath(p))
+                print(os.path.relpath(p).replace('\\', '/'))
--

2.29.3

#2 lore raw
Quoted 14 lines · Juraj Linkeš
Quoted 14 lines

-----Original Message-----
From: Dmitry Kozlyuk <[email protected]>
Sent: Thursday, April 15, 2021 11:36 PM
To: [email protected]
Cc: Dmitry Kozlyuk <[email protected]>; Juraj Linkeš <[email protected]>; Bruce Richardson <[email protected]>
Subject: [PATCH] buildtools: fix all drivers disabled on Windows

buildtools/list-dir-globs.py printed paths with OS directory separator, which is "/" on Unices and "\" on Windows, while Meson code always expected "/". This resulted it all drivers being disabled on Windows.

Quoted 10 lines
Quoted 5 lines

Replace "\" with "/" in script output. Forward slash is a valid, although non- default, separator on Windows, so no paths can be broken by this substitution.

Fixes 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc Juraj Linkeš <[email protected]>

This patch was only the latest that changed the code if the file, but not the logic related to path separators. I think you patch fixes the original commit ab9407c3addd.

Quoted 2 lines

+1 for the correction for the fixes line.

Quoted 18 lines
Quoted 17 lines
---
 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/list-dir-globs.py index renamed from buildtools/list-dir-globs.py +0 -0

911e267335..d824360d39 100755

buildtools/list-dir-globs.py +1 -2
@@ -17,4 +17,4 @@
     if path:
         for p in iglob(os.path.join(root, path)):
             if os.path.isdir(p):
-                print(os.path.relpath(p))
+                print(os.path.relpath(p).replace('\\', '/'))
--

2.29.3

#3 lore raw

PATCH v2 1/1 buildtools: fix all drivers disabled on Windows

In reply to Dmitry Kozlyuk

buildtools/list-dir-globs.py printed paths with OS directory separator, which is "/" on Unices and "\" on Windows, while Meson code always expected "/". This resulted in all drivers being disabled on Windows.

Replace "\" with "/" in script output. Forward slash is a valid, although non-default, separator on Windows, so no paths can be broken by this substitution.

Fixes ab9407c3addd ("build: allow using wildcards to disable drivers")

---
v2: Change fixes line, correct a typo (Juraj, Bruce).

Not sure if it's worth backporting: it wasn't an issue in 20.11 and the patch won't apply as-is.

 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/list-dir-globs.py +1 -1
index 911e267335..d824360d39 100755
@@ -17,4 +17,4 @@
     if path:
         for p in iglob(os.path.join(root, path)):
             if os.path.isdir(p):
-                print(os.path.relpath(p))
+                print(os.path.relpath(p).replace('\\', '/'))
Signature · 1 line
2.29.3
#4 lore raw

16/04/2021 22:48, Dmitry Kozlyuk:

Quoted 11 lines

buildtools/list-dir-globs.py printed paths with OS directory separator, which is "/" on Unices and "\" on Windows, while Meson code always expected "/". This resulted in all drivers being disabled on Windows.

Replace "\" with "/" in script output. Forward slash is a valid, although non-default, separator on Windows, so no paths can be broken by this substitution.

Fixes ab9407c3addd ("build: allow using wildcards to disable drivers")
Quoted 7 lines

---
v2: Change fixes line, correct a typo (Juraj, Bruce).

Not sure if it's worth backporting: it wasn't an issue in 20.11 and the patch won't apply as-is.

The commit you mention was introduced in 21.02.
No matter which release it is, it is good to suggest backporting for those who need to maintain an old release even if not upstream.

Applied, thanks