Merge branch 'fix-install-tag-check' into 'main'

ci: Fix check for missing install tag

See merge request GNOME/glib!3019
This commit is contained in:
Marco Trevisan 2022-10-26 16:51:17 +00:00
commit 0d425bc276
6 changed files with 25 additions and 8 deletions

View File

@ -6,6 +6,7 @@ missing installation tag.
"""
import argparse
import json
from pathlib import Path
@ -14,14 +15,16 @@ def main():
parser.add_argument("builddir", type=Path)
args = parser.parse_args()
logfile = args.builddir / "meson-logs" / "meson-log.txt"
with logfile.open(encoding="utf-8") as f:
if "Failed to guess install tag" in f.read():
print(
f"Some files are missing install_tag, see {logfile} for details." # no-qa
)
return 1
return 0
success = True
path = args.builddir / "meson-info" / "intro-install_plan.json"
with path.open(encoding="utf-8") as f:
install_plan = json.load(f)
for target in install_plan.values():
for info in target.values():
if not info["tag"]:
print('Missing install_tag for', info["destination"])
success = False
return 0 if success else 1
if __name__ == "__main__":

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -e
./.gitlab-ci/check-missing-install-tag.py _build
meson test \

View File

@ -750,6 +750,8 @@ gvisibility_h = custom_target(
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GIO', '@OUTPUT@'],
install: true,
install_dir: gio_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
)
gio_sources += gvisibility_h
@ -766,6 +768,8 @@ gioenumtypes_h = custom_target('gioenumtypes_h',
input : gio_headers,
install : true,
install_dir : gio_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
command : [python, glib_mkenums,
'--template', files('gioenumtypes.h.template'),
'@INPUT@', gnetworking_h])
@ -1064,6 +1068,7 @@ if enable_systemtap
output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)),
configuration : stp_cdata,
install_dir : tapset_install_dir,
install_tag : 'systemtap',
)
endif

View File

@ -13,6 +13,7 @@ gversionmacros_h = custom_target(
command: [gen_visibility_macros, meson.project_version(), 'versions-macros', '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: glib_sub_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
)
@ -21,6 +22,7 @@ gvisibility_h = custom_target(
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GLIB', '@OUTPUT@'],
install: true,
install_dir: glib_sub_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
)

View File

@ -73,6 +73,8 @@ gvisibility_h = custom_target(
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'],
install: true,
install_dir: g_module_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
)
gmodule_sources = [gmodule_c, gvisibility_h]

View File

@ -32,6 +32,8 @@ gvisibility_h = custom_target(
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'],
install: true,
install_dir: gobject_includedir,
# FIXME: Not needed with Meson >= 0.64.0
install_tag: 'devel',
)
gobject_sources += gvisibility_h
@ -120,6 +122,7 @@ glib_enumtypes_h = custom_target('glib_enumtypes_h',
input : glib_enumtypes_input_headers,
install : true,
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'),
install_tag: 'devel',
command : [python, glib_mkenums,
'--template', files('glib-enumtypes.h.template'),
'@INPUT@'])