We were storing the pkg-config path on the class as a static variable -- PkgConfigDependency.pkgbin. When we regenerate via Ninja, the found-deps are all cached in a pickled coredata, so if you have a statement that does dep.get_pkgconfig_variable(), it will raise the following exception because the static class variables are per-meson-invocation. To fix this, we store the pkg-config binary as both a class variable and an instance variable. Traceback (most recent call last): File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonmain.py", line 289, in run app.generate() File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonmain.py", line 177, in generate intr.run() File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 2215, in run super().run() File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 124, in run self.evaluate_codeblock(self.ast, start=1) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock raise e File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock self.evaluate_statement(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 150, in evaluate_statement return self.function_call(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 371, in function_call return self.funcs[func_name](node, self.flatten(posargs), kwargs) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 47, in wrapped return f(self, node, args, kwargs) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 2035, in func_subdir self.evaluate_codeblock(codeblock) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock raise e File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock self.evaluate_statement(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 160, in evaluate_statement return self.evaluate_if(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 213, in evaluate_if self.evaluate_codeblock(i.block) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock raise e File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock self.evaluate_statement(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 160, in evaluate_statement return self.evaluate_if(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 213, in evaluate_if self.evaluate_codeblock(i.block) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 145, in evaluate_codeblock raise e File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 139, in evaluate_codeblock self.evaluate_statement(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 182, in evaluate_statement return self.evaluate_plusassign(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 333, in evaluate_plusassign addition = self.evaluate_statement(node.value) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 166, in evaluate_statement return self.evaluate_arraystatement(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 193, in evaluate_arraystatement (arguments, kwargs) = self.reduce_arguments(cur.args) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 515, in reduce_arguments reduced_pos = [self.evaluate_statement(arg) for arg in args.arguments] File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 515, in <listcomp> reduced_pos = [self.evaluate_statement(arg) for arg in args.arguments] File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 154, in evaluate_statement return self.method_call(cur) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreterbase.py", line 399, in method_call return obj.method_call(method_name, self.flatten(args), kwargs) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/interpreter.py", line 982, in method_call value = fn(state, args, kwargs) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/modules/gnome.py", line 499, in generate_gir girdir = dep.get_pkgconfig_variable("girdir") File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/dependencies.py", line 219, in get_pkgconfig_variable ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name]) File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/dependencies.py", line 184, in _call_pkgbin p, out = Popen_safe([PkgConfigDependency.pkgbin] + args, env=os.environ)[0:2] File "/home/nirbheek/projects/repositories/github/meson.git/mesonbuild/mesonlib.py", line 392, in Popen_safe stderr=stderr, **kwargs) File "/usr/lib64/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib64/python3.5/subprocess.py", line 1474, in _execute_child executable = os.fsencode(executable) File "/usr/lib64/python3.5/os.py", line 862, in fsencode raise TypeError("expect bytes or str, not %s" % type(filename).__name__) TypeError: expect bytes or str, not NoneType FAILED: build.ninja '/usr/bin/python3' '/home/nirbheek/projects/repositories/github/meson.git/meson.py' --internal regenerate '/home/nirbheek/projects/repositories/gst/gstreamer' '/home/nirbheek/projects/repositories/gst/gstreamer/build' --backend ninja ninja: error: rebuilding 'build.ninja': subcommand failedpull/1247/head
parent
d517bbfb5c
commit
de0b02ee2d
1 changed files with 13 additions and 4 deletions
Loading…
Reference in new issue