Bug 472917

Summary: Add ability to ignore individual module outside of module-set in config
Product: [Developer tools] kdesrc-build Reporter: Andrew Shark <ashark>
Component: project metadataAssignee: Michael Pyne <mpyne>
Status: RESOLVED FIXED    
Severity: wishlist CC: alain, jannick-kremer, nate, omerusta, serg
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrew Shark 2023-08-02 11:26:38 UTC
The gpgme module fails to build currently. I can skip it with command line option `--ignore-modules gpgme`. But I want to set this choice to the config, so I do not need to write it each time.

There is `ignore-modules` option in [documentation](https://docs.kde.org/trunk5/en/kdesrc-build/kdesrc-build/conf-options-table.html#ignore-modules). But it can only be used in `module-set` sections.

And the `gpgme` module is not in any module set.
It is defined in `~/kde/src/kdesrc-build/custom-qt6-libs-build-include`:
```
# qgpgme is part of gpgme...
module gpgme
    repository https://dev.gnupg.org/source/gpgme.git
    branch master
    # NOTE: you need to run ./autogen.sh before kdesrc-build runs configure.
    # Maybe we can ask kdesrc-build do to that?
    configure-flags --enable-maintainer-mode --enable-languages=cpp,qt6
end module
```

As a workaround, I can comment these lines.

But it would be normal to be able to configure your `kdesrc-buildrc` without needing to edit the `custom-qt6-libs-build-include`.

Probably something like this:
```kdesrc-buildrc
global
...
end global
...
options global
    ignore-modules gpgme
end options
```
Comment 1 Jannick 2023-08-10 16:50:46 UTC
Only semi-related, but you can also fix the build issue by just excluding the tests:
`configure-flags --enable-maintainer-mode --enable-languages=cpp,qt6 --disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test`
Comment 2 Alain Laporte 2023-12-07 14:36:44 UTC
Excluding test is not sufficient for me because GPGME_QT6 is also not detected by configure =>
```
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GPGME_QT6... no
checking for GPGME_QT6TEST... no
configure: error: 
***
*** Qt6 (Qt6Core) is required for the Qt 6 binding.
***
```
Comment 3 Andrew Shark 2023-12-07 14:40:31 UTC
Let's keep this bug report on the topic (ignore individual module outside of module-set in the config).
Comment 4 Andrew Shark 2024-01-28 07:36:57 UTC
Git commit 66bff6dc56039cc75bcc64bc5a7c6fb38f9b1e82 by Andrew Shark.
Committed on 28/01/2024 at 07:28.
Pushed by ashark into branch 'master'.

Allow ignoring modules from global config

This will let users to constantly ignore specified modules in global section, so they do not need to pass it in command line each time.

Also, it will allow to ignore some defined modules that are not in any module set (for example, gpgme).

M  +2    -2    doc/conf-options-table.docbook
M  +3    -1    doc/supported-cmdline-params.docbook
M  +8    -1    modules/ksb/Application.pm
M  +13   -3    modules/ksb/BuildContext.pm

https://invent.kde.org/sdk/kdesrc-build/-/commit/66bff6dc56039cc75bcc64bc5a7c6fb38f9b1e82
Comment 5 Ömer Fadıl USTA 2024-01-29 22:34:04 UTC
(In reply to Andrew Shark from comment #0)
> The gpgme module fails to build currently. I can skip it with command line
> option `--ignore-modules gpgme`. But I want to set this choice to the
> config, so I do not need to write it each time.


Thank you for patch , but out of curiosity why your gpgme couldnt compile on your system ?
I have no problem compiling it on my system ( using kdesrc-build )  [ using manjaro linux ]
These 4 are the only ones which couldnt be compiled right now for me :
libsignon-glib: Failed on build after 2 seconds.  [ due to need of root access ]
libkipi: Failed on build after 3 seconds.
krfb: Failed on build after 10 seconds.
krdc: Failed on build after 7 seconds.
Comment 6 Andrew Shark 2024-01-29 22:44:05 UTC
I currently can build gpgme. This issue was created what it failed to build.
For other issues, please use the appropriate communication channels.
Comment 7 Andrew Shark 2024-05-10 09:17:08 UTC
Git commit 24f6b604e110113070dfef7e3d3951fbe55a1a2f by Andrew Shark.
Committed on 28/01/2024 at 07:28.
Pushed by ashark into branch 'docbook_historied_per_file'.

Allow ignoring modules from global config

This will let users to constantly ignore specified modules in global section, so they do not need to pass it in command line each time.

Also, it will allow to ignore some defined modules that are not in any module set (for example, gpgme).

Original commit: 66bff6dc
https://invent.kde.org/sdk/kdesrc-build/-/commit/66bff6dc56039cc75bcc64bc5a7c6fb38f9b1e82

M  +3    -1    doc/cmdline/supported-cmdline-params.docbook
M  +2    -2    doc/kdesrc-buildrc/conf-options-table.docbook

https://invent.kde.org/sdk/kdesrc-build/-/commit/24f6b604e110113070dfef7e3d3951fbe55a1a2f