[sdk/kdesrc-build] /: Allow ignoring modules from global config

2024-01-27 Thread Andrew Shark
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).

BUG: 472917

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

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

diff --git a/doc/conf-options-table.docbook b/doc/conf-options-table.docbook
index 8722b1ae..ed52e6bc 100644
--- a/doc/conf-options-table.docbook
+++ b/doc/conf-options-table.docbook
@@ -1335,8 +1335,8 @@ installations. However this only works on build systems 
that support
 TypeString
 Available since1.16
 
-Currently can only be used in module-set, see https://bugs.kde.org/show_bug.cgi?id=472917;>Bug 472917.
+This option can be used in global section and in module-sets.
+Note that when specified in global section,  cmdline 
option does not override this, but instead appends.
 Modules named by this option, which would be chosen by 
 due to a use-modules option, are
 instead skipped entirely. Use this option when you want to build an entire
diff --git a/doc/supported-cmdline-params.docbook 
b/doc/supported-cmdline-params.docbook
index 494a3363..7c4f8f31 100644
--- a/doc/supported-cmdline-params.docbook
+++ b/doc/supported-cmdline-params.docbook
@@ -53,7 +53,9 @@ Do not include the modules passed on the rest of the command 
line in the
 update/build process (this is useful if you want to build most of the modules
 in your configuration file and just skip
 a few).
-
+
+Note that this option does not override ignore-modules config option in global 
section. Instead, it appends it.
+
 
 
 
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index 7847092a..24459d07 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -264,7 +264,7 @@ EOF
 }
 
 # Convert list to hash for lookup
-my %ignoredSelectors =
+my %ignored_in_cmdline =
 map { $_, 1 } @{$opts->{'ignore-modules'}};
 
 my @startProgramAndArgs = @{$opts->{'start-program'}};
@@ -313,6 +313,13 @@ EOF
 _readConfigurationOptions($ctx, $fh, $cmdlineGlobalOptions, 
$deferredOptions);
 close $fh;
 
+my %ignored_in_global_section =
+map { $_, 1 } split(" ", $ctx->{options}->{"ignore-modules"});
+$ctx->{options}->{"ignore-modules"} = "";
+
+# For user convenience, cmdline ignored selectors would not override the 
config selectors. Instead, they will be merged.
+my %ignoredSelectors = (%ignored_in_cmdline, %ignored_in_global_section);
+
 # Check if we're supposed to drop into an interactive shell instead.  If 
so,
 # here's the stop off point.
 
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index a7b0e15b..b247796f 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -795,13 +795,23 @@ sub getOption ($self, $key, $level = 'module')
 $self->ksb::OptionsBase::getOption($key);
 }
 
-# OVERRIDE: Overrides OptionsBase::setOption to handle some global-only 
options.
+# OVERRIDE
 sub setOption
 {
 my ($self, %options) = @_;
 
-# Actually set options.
-$self->SUPER::setOption(%options);
+# Special case handling.
+if (exists $options{'filter-out-phases'}) {
+for my $phase (split(' ', $options{'filter-out-phases'})) {
+$self->phases()->filterOutPhase($phase);
+}
+delete $options{'filter-out-phases'};
+}
+
+# Our immediate parent class Module overrides this, but we actually
+# want the OptionsBase version to be used instead, because Module's 
version specifically checks for
+# some options prohibited for it (such as "ignore-modules") but we may 
want such for BuildContext.
+$self->ksb::OptionsBase::setOption(%options);
 
 # Automatically respond to various global option changes.
 while (my ($key, $value) = each %options) {


[khelpcenter] [Bug 454519] The help center doesn't open on its index page

2024-01-27 Thread John
https://bugs.kde.org/show_bug.cgi?id=454519

--- Comment #1 from John  ---
Same problem in Plasma 6 RC1

All I see is a bland white page.
Scrolling up or down doesn't show or changes anything either.

-- 
You are receiving this mail because:
You are the assignee for the bug.