buildtools: fix all drivers disabled on Windows

Message ID 20210415213629.30728-1-dmitry.kozliuk@gmail.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series buildtools: fix all drivers disabled on Windows |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/iol-abi-testing warning Testing issues
ci/intel-Testing success Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Dmitry Kozlyuk April 15, 2021, 9:36 p.m. UTC
  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š <juraj.linkes@pantheon.tech>

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Juraj Linkeš April 16, 2021, 6:44 a.m. UTC | #1
> -----Original Message-----
> From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Sent: Thursday, April 15, 2021 11:36 PM
> To: dev@dpdk.org
> Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>; Juraj Linkeš
> <juraj.linkes@pantheon.tech>; Bruce Richardson <bruce.richardson@intel.com>
> 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.
> 
> 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š <juraj.linkes@pantheon.tech>

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.

> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
>  buildtools/list-dir-globs.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py index
> 911e267335..d824360d39 100755
> --- a/buildtools/list-dir-globs.py
> +++ b/buildtools/list-dir-globs.py
> @@ -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
>
  
Bruce Richardson April 16, 2021, 9:14 a.m. UTC | #2
On Fri, Apr 16, 2021 at 06:44:34AM +0000, Juraj Linkeš wrote:
> 
> 
> > -----Original Message-----
> > From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > Sent: Thursday, April 15, 2021 11:36 PM
> > To: dev@dpdk.org
> > Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>; Juraj Linkeš
> > <juraj.linkes@pantheon.tech>; Bruce Richardson <bruce.richardson@intel.com>
> > 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.
> > 
> > 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š <juraj.linkes@pantheon.tech>
> 
> 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.
> 
> > 
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

+1 for the correction for the fixes line.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

> > ---
> >  buildtools/list-dir-globs.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py index
> > 911e267335..d824360d39 100755
> > --- a/buildtools/list-dir-globs.py
> > +++ b/buildtools/list-dir-globs.py
> > @@ -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
> > 
>
  

Patch

diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py
index 911e267335..d824360d39 100755
--- a/buildtools/list-dir-globs.py
+++ b/buildtools/list-dir-globs.py
@@ -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('\\', '/'))