Comment 3 for bug 1123126

Revision history for this message
Harald Sitter (apachelogger) wrote : Re: plasma-desktop not running init script from k-d-s

<apachelogger> QStringList scripts = KGlobal::dirs()->findAllResources("data", appName + "/init/*.js");
<apachelogger> scripts.sort();
<apachelogger> Riddell: that's why the plasma init script is not run
<shadeslayer> didn't we fix that already
<shadeslayer> s/we/I/
<kubotu> shadeslayer meant: "didn't I fix that already"
<apachelogger> not upstream apparently?
<shadeslayer> lolwot
<shadeslayer> untrue
<apachelogger> dunno
<apachelogger> looking at the sourcery right now
<shadeslayer> I upstreamed it man
<shadeslayer> I upstream all the things
<apachelogger> shadeslayer: not fixed in the 4.8 branch
<shadeslayer> bah
<apachelogger> or
<apachelogger> hm
<shadeslayer> patch it patch it patch it
<shadeslayer> 4.8 was EOL
<shadeslayer> right?
<apachelogger> there also was no patch in 4.8.2
<apachelogger> wtf
<shadeslayer> @_@
-*- shadeslayer sighs
<apachelogger> so
<apachelogger> it was
<apachelogger> QStringList scripts = KGlobal::dirs()->findAllResources("data", appName + "/init/*.js");
<apachelogger> QStringList scriptPaths;
<apachelogger> then it got a sort
<shadeslayer> right
<apachelogger> both shit because master looks completely different
<shadeslayer> we could actually get rid of all the weird logic
<apachelogger> well, not completely different
<apachelogger> just vastly different
<apachelogger> ah
<apachelogger> we should patch master into .5
<shadeslayer> dude, just look at my commit or sth
<apachelogger> much nicer code
<shadeslayer> heh
<shadeslayer> this is in workspace right?
<apachelogger> it uses findDirs rather than findAllResources and then builds the script paths manually
<apachelogger> http://quickgit.kde.org/?p=kde-workspace.git&a=blob&h=620915cc319bae50830a3b521f0f981a72c0d772&hb=e656398cefa2167aee1913244f633579676db985&f=libs%2Fplasmagenericshell%2Fscripting%2Fscriptengine.cpp
<apachelogger> last function
<shadeslayer> yus, that's me
<shadeslayer> omg apachelogger said my code is nice
<shadeslayer> my life is complete
<shadeslayer> :P
<apachelogger> well
<apachelogger> IIRC I came up with the algorithm :P
<apachelogger> did not realize it was such a well thought through one
<apachelogger> :)
<shadeslayer> eh, no one here wanted to know that :P
<apachelogger> shadeslayer: so you did not patch .8 for which you should get a beating really
<apachelogger> and that .sort there is what breaks it obviously
<apachelogger> what with /usr/share/kde4 < /usr/share/kubuntu-*
<shadeslayer> no, I was under the assumption that .8 was EOL so it was pointless
<shadeslayer> but turns out we ship EOL software for precise
<apachelogger> version+2 needs to be released for a release to go EOL upstream
<apachelogger> shadeslayer: it was not EOL at the time
<shadeslayer> and we discovered this issue in the first 4.10 release IIRC
<apachelogger> it only went EOL like 2 weeks ago :S
<apachelogger> shadeslayer: nope
<apachelogger> that should have been .9
<shadeslayer> oh
<shadeslayer> hm
<shadeslayer> fine, patch it
<apachelogger> otherwise they'd not have it backported to .8.5
<apachelogger> shadeslayer: u break it, you fix it :P

last function on each
4.8.2: http://quickgit.kde.org/?p=kde-workspace.git&a=blob&h=0fb2d38ae97351201fd36ff8bbae707a944fc579&hb=60055539303a1781a4ce4fde8bd71e632e4b69ab&f=libs%2Fplasmagenericshell%2Fscripting%2Fscriptengine.cp
4.8.5: http://quickgit.kde.org/?p=kde-workspace.git&a=blob&h=777a56dfc2fca79f9645bbe0f9d3e068adbf71de&hb=a29edb46f0ca4c8de01f849abd6f6be069b9e2b7&f=libs%2Fplasmagenericshell%2Fscripting%2Fscriptengine.cpp
master: http://quickgit.kde.org/?p=kde-workspace.git&a=blob&h=620915cc319bae50830a3b521f0f981a72c0d772&hb=e656398cefa2167aee1913244f633579676db985&f=libs%2Fplasmagenericshell%2Fscripting%2Fscriptengine.cpp

applying the master changes should be the more durable fix, however reverting to the .2 version also should nicely resolve the presented issue. at any rate the .sort() call needs to go away as that breaks kde's resource order.