ci: Fix gst-full breakage due to typos

This broke in 81bdef0150df3306136137a5187dc25a7c5f4aee. Simplify
removal of the plugin from the plugin list if features are listed, and
fix invocation of the script -- it was adding an extra space before
the first plugin filename.

Also ensure that gst-full CI is run when the script changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9452>
This commit is contained in:
Nirbheek Chauhan 2025-07-28 23:25:58 +05:30
parent 81bdef0150
commit c98d49f13e
3 changed files with 21 additions and 16 deletions

View File

@ -803,6 +803,14 @@ gstreamer-full static build:
script:
- $CI_PROJECT_DIR/ci/scripts/build.sh build/
- meson test -C build -v test-gst-full
rules:
- !reference [.upstream-branch-rules, rules]
- changes:
paths:
*modules_changes
- changes:
paths:
- "scripts/generate_init_static_plugins.py"
gstreamer-full-minimal static build:
extends: 'gstreamer-full static build'

View File

@ -419,12 +419,12 @@ if building_full
init_static_plugins_c = configure_file(
output: 'gstinitstaticplugins.c',
command : [generate_init_static_plugins,
'-o ' + '@OUTPUT@',
'-p ' + all_plugin_names,
'-e ' + get_option('gst-full-elements'),
'-t ' + get_option('gst-full-typefind-functions'),
'-d ' + get_option('gst-full-device-providers'),
'-T ' + get_option('gst-full-dynamic-types'),
'-o', '@OUTPUT@',
'-p', all_plugin_names,
'-e', get_option('gst-full-elements'),
'-t', get_option('gst-full-typefind-functions'),
'-d', get_option('gst-full-device-providers'),
'-T', get_option('gst-full-dynamic-types'),
'--giomodules', ';'.join(giomodules),
]
)

View File

@ -48,14 +48,6 @@ gst_init_static_plugins (void)
''')
# Retrieve the plugin name as it can be a plugin filename
# Retrieve the plugin name as it can be a plugin filename
def get_plugin_name(name):
if name in plugins or f'libgst{name}.a' in plugins:
return name
return None
def process_features(features_list, plugins, feature_prefix):
plugins_list = plugins
feature_declaration = []
@ -66,8 +58,13 @@ def process_features(features_list, plugins, feature_prefix):
split = plugin.split(':')
plugin_name = split[0].strip()
if len(split) == 2:
if get_plugin_name(plugin_name) is not None:
plugins_list.remove(get_plugin_name(plugin_name))
if plugin_name in plugins_list:
plugins_list.remove(plugin_name)
else:
# The plugin name can be a filename
fname = f'libgst{plugin_name}.a'
if fname in plugins_list:
plugins_list.remove(fname)
features = split[1].split(',')
for feature in features:
feature = feature.replace("-", "_")