From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 28 Oct 2021 10:53:26 -0700 Subject: [PATCH] modules/gnome: fix missing install_dir, again, harder It turns out this could be missing in GResource*Target as well, due mostly to the same problem, side effects of mutating a shared dictionary; though it could also happen with a specific set of keywords given and other omitted. Fixes #9350 --- mesonbuild/modules/gnome.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 4b3107e36738..e825981d40f1 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -278,18 +278,20 @@ class GnomeModule(ExtensionModule): if install_header and not export: raise MesonException('GResource header is installed yet export is not enabled') - kwargs['input'] = args[1] - kwargs['output'] = output - kwargs['depends'] = depends + c_kwargs = kwargs.copy() + c_kwargs['input'] = args[1] + c_kwargs['output'] = output + c_kwargs['depends'] = depends + c_kwargs.setdefault('install_dir', []) if not mesonlib.version_compare(glib_version, gresource_dep_needed_version): # This will eventually go out of sync if dependencies are added - kwargs['depend_files'] = depend_files - kwargs['command'] = cmd + c_kwargs['depend_files'] = depend_files + c_kwargs['command'] = cmd else: depfile = f'{output}.d' - kwargs['depfile'] = depfile - kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@'] - target_c = GResourceTarget(name, state.subdir, state.subproject, kwargs) + c_kwargs['depfile'] = depfile + c_kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@'] + target_c = GResourceTarget(name, state.subdir, state.subproject, c_kwargs) if gresource: # Only one target for .gresource files return ModuleReturnValue(target_c, [target_c])