<table><tr><td style="">sniperrifle created this revision.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />sniperrifle requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D25604">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch ensures the XDG_DATA_DIRS will be properly altered and only when necessary. This implies:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">If the data root is already in XDG_DATA_DIRS either in the value or in the spec's default value, the value will remain unchanged.</li>
<li class="remarkup-list-item">If the data root is not in the value yet, it will be prepended, thus given preference over other prefixes containing KDE resources. This is what I believe was the intention of the original code.</li>
</ul>
<p>Furthermore this restores the proper preference order of the default value.</p>
<p>BUG: 315452</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I tested three scenarios by setting XDG_DATA_DIRS in startplasma-dev.sh:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Unset and not present. Should result in <dev-data-root>:/usr/local/share:/usr/share</li>
<li class="remarkup-list-item">Set and present. Should leave value unchanged</li>
<li class="remarkup-list-item">Set and not present. I tested this by setting it to the default value manually with a bogus diretory in between. Leaving out the default might have led to other problems. Should result in <dev-data-root>:/bogus:/usr/local/share:/usr/share</li>
</ul>
<p>I did not test the fourth scenario unset and present, since it would have involved installing the dev kde in /usr/local or /usr and I did not want to do that.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25604">https://phabricator.kde.org/D25604</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>startkde/startplasma.cpp</div></div></div><br /><div><strong>To: </strong>sniperrifle<br /><strong>Cc: </strong>plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>