Skip to content

Incorrect 'Validate schema file' step #291

@x1z53

Description

@x1z53

The original unformatted file is currently being submitted for validation, which causes the following error:

/usr/src/RPM/BUILD/gradia-1.10.0/data/be.alexandervanhee.gradia.gschema.xml:4:1  Error on line 4 char 1: A path, if given, must begin and end with a slash.  --strict was specified; exiting.

My fix:
(Since I'm not well versed in Meson, I decided not to open PR, as there might be a better solution.)

diff --git a/data/meson.build b/data/meson.build
index c0dbc4f..ac3fecc 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -69,8 +69,10 @@ install_data(
   install_dir: join_paths(get_option('datadir'), 'fonts')
 )
 
+fs = import('fs')
+
 # Install GSettings schema
-configure_file(
+gschema = configure_file(
   input: '@[email protected]'.format(PROJECT_RDNN_NAME),
   output: '@[email protected]'.format(APPLICATION_ID),
   configuration: conf,
@@ -82,7 +84,7 @@ configure_file(
 compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
 if compile_schemas.found()
   test('Validate schema file', compile_schemas,
-    args: ['--strict', '--dry-run', meson.current_source_dir()]
+    args: ['--strict', '--dry-run', fs.parent(gschema)]
   )
 endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions