[PATCH 1/2] build: fix list_dir_globs failure in MSYS2
Bruce Richardson
bruce.richardson at intel.com
Tue Sep 19 10:12:13 CEST 2023
On Sat, Sep 16, 2023 at 09:15:19PM +0800, Ric Li wrote:
> When running 'meson build' in MSYS2,
> "list-dir-globs.py * failed with status 1".
>
> Signed-off-by: Ric Li <ricmli at outlook.com>
> ---
> app/meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/meson.build b/app/meson.build
> index e4bf5c531c..73e5138301 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -11,7 +11,7 @@ disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().s
> enable_apps = ',' + get_option('enable_apps')
> enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split()
> if enable_apps.length() == 0
> - enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split()
> + enable_apps = run_command(list_dir_globs, '*/', check: true).stdout().split()
> endif
>
Do we know more about why this particular failure is happening with MSYS2?
Can you try running the script manually to see what the specific python
error is, and if we can make the script more robust generally?
In terms of the fix, I actually think we should not be using a glob here at
all. Since we already have the list of apps present in the file, I think
that we should move the app list to the top of the file and then change the
code to be:
if enable_apps.length() == 0
enable_apps = apps
endif
This sidesteps any issues with globbing, and also makes the code a bit
faster as we don't have to shell-out to a python script.
/Bruce
More information about the dev
mailing list