aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-08-21 23:18:36 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-08-22 13:56:41 +0300
commit0287af461c49c80a47f74b5e6d65844afcfdc20e (patch)
treeee0a44756481a7b4429918e28d035e1dc3858d3c
parent5a7b8d86d0c455680096d47cb87f0de08c0954ac (diff)
downloadmeson-0287af461c49c80a47f74b5e6d65844afcfdc20e.zip
meson-0287af461c49c80a47f74b5e6d65844afcfdc20e.tar.gz
meson-0287af461c49c80a47f74b5e6d65844afcfdc20e.tar.bz2
fix coding errors in unstable-coredata subcommand
One percent-formatted string had a .format() method style placeholder and thus never output anything other than TypeError: not all arguments converted during string formatting The other error may be due to changing format elsewhere, because it attempted to treat an entire tuple as though it only contained one element. Based on context, it's clear this is supposed to be the actual dependency name, but the internal representation may have changed over time. These fixes allow the command to run to completion successfully; of course it is still unstable and possibly not actually maintained, since it's been broken for 2 years and no one actually noticed.
-rw-r--r--mesonbuild/munstable_coredata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py
index 0ca8f33..49e0530 100644
--- a/mesonbuild/munstable_coredata.py
+++ b/mesonbuild/munstable_coredata.py
@@ -95,7 +95,7 @@ def run(options):
dump_compilers(v[for_machine])
elif k == 'deps':
def print_dep(dep_key, dep):
- print(' ' + dep_key[0] + ": ")
+ print(' ' + dep_key[0][1] + ": ")
print(' compile args: ' + repr(dep.get_compile_args()))
print(' link args: ' + repr(dep.get_link_args()))
if dep.get_sources():
@@ -105,7 +105,7 @@ def run(options):
for for_machine in iter(MachineChoice):
items_list = list(sorted(v[for_machine].items()))
if items_list:
- print('Cached dependencies for {} machine' % for_machine.get_lower_case_name())
+ print(f'Cached dependencies for {for_machine.get_lower_case_name()} machine')
for dep_key, deps in items_list:
for dep in deps:
print_dep(dep_key, dep)