WARNING: was bad recommendation (Re: Recommendation: drop ProvidersUrl entry to rely on default value)

Friedrich W. H. Kossebau kossebau at kde.org
Fri Jan 31 01:08:35 GMT 2020


Hi,

TLDR: removing the ProvidersUrl entry actually breaks things in non-Plasma 
installations, so for now has to be hardcoded, using the non-deprecated

ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml

See below for investigation results:

Am Freitag, 31. Januar 2020, 00:14:19 CET schrieb Christoph Feck:
> On 01/30/20 13:53, Friedrich W. H. Kossebau wrote:
> > as found out by discussion on irc, a good solution for everyone relying on
> > the default GHNS storage as provided by KDE is to just not hard-code any
> > value for ProvidersUrl, but leave it out and let KNewStuff default to
> > what is built into the KNewStuff library as current value.
> 
> Does it work with all KNewStuff 5.x versions? Otherwise, the required
> KF5 version would need to be bumped where this change was made.

I was to say
"Yes, works with all existing 5.x versions."
as that behaviour was there already in kdelibs4 time.
Which I remember from relying in Okteta on it.
And felt confirmed on reading again
https://techbase.kde.org/Development/Tutorials/Collaboration/HotNewStuff/
Introduction#The_Configuration_File_.28.knsrc.29
which claims:
"
The ProvidersUrl is optional, and if you just want to use what KDE provides as 
default (http://autoconfig.kde.org/ocs/providers.xml, currently 
store.kde.org), leave this out. The advantage of not specifying this field is 
that users can add more providers using the attica kcm (kcmshell5 kcm_attica). 
"
As well as getting a +1 from a KNewStuff developer ;)

Just, looking at the actual code now to confirm this, I found that actually is 
not totally true, only holds if also Plasma is installed. Why?
If ProvidersUrl is not set, KNewStuff will get the default from Attica. Attica 
has some kind of platform-support, which though is hardcoded to search only 
for a plugin called "attica_kde". That very plugin is only coming from Plasma, 
so only installed if Plasma is installed. And only that plugin provides that 
very default with the *.kde.org url.
If that plugin is not present, the code falls back to some built-in 
QtPlatformDependent object, which delivers no default provider at all.

I tested this by removing /usr/lib64/qt5/plugins/attica_kde.so, as result 
Okteta no longer had content listed in the Structures GHNS dialog. Independent 
of running in Gnome or Plasma.

So seems there is some flaw in the design of Attica when it comes to the 
concept of platforms: having a different provider for a non-Plasma platform 
does not make sense to me.
This needs to be rethought, also when it comes to defaults.

Too sleepy to think further now. And this best is sorted out by KNewStuff 
developers :)

Cheers
Friedrich






More information about the kde-core-devel mailing list