Re: Configuration files transfer

2014-04-13 Thread Kevin Krammer
On Saturday, 2014-04-12, 18:33:02, David Faure wrote:
 On Saturday 12 April 2014 12:08:12 Kevin Krammer wrote:
  On Saturday, 2014-04-12, 06:57:41, Ivan Čukić wrote:
+for (const auto testSubdir: { .kde, .kde5 }) {
Shouldn't that be .kde4?
   
   Yes, already fixed in the next commit. :)
   
That block of code ($KDEHOME, otherwise ~/.kde, otherwise ~/.kde4)
sounds
like code that could be shared. Should we have a kde4ConfigHome() and
kde4DataHome() in, hmm, kcoreaddons?
   
   That is why I asked the question in the first place. I'd say it would be
   better to have this in a common place instead of every application
   implementing it for itself.
  
  Don't we have KStandardDirs in some porting framework?
 
 Yes, but
 1) it's in kdelibs4support, deprecated, i.e. apps are supposed to port AWAY
 from it.
 2) its logic has been ported away from KDEHOME and to
 XDG_DATA_HOME/XDG_CONFIG_HOME etc. instead. So that a KF5-based app still
 using KStandardDirs, would at least write into the right place.
 So this isn't useful for migrating the KDE4 data.

I see.
Was just concered that we add KDE specific things to an otherwise independent 
framework.
But I guess a single class can't be considered overhead :)

 Plus it's kind of overkill since it handles many levels for many resources
 while all we need is the local config and data dirs.

Right, hadn't though about that.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


Re: Configuration files transfer

2014-04-12 Thread Kevin Krammer
On Saturday, 2014-04-12, 06:57:41, Ivan Čukić wrote:
  +for (const auto testSubdir: { .kde, .kde5 }) {
  Shouldn't that be .kde4?
 
 Yes, already fixed in the next commit. :)
 
  That block of code ($KDEHOME, otherwise ~/.kde, otherwise ~/.kde4) sounds
  like code that could be shared. Should we have a kde4ConfigHome() and
  kde4DataHome() in, hmm, kcoreaddons?
 
 That is why I asked the question in the first place. I'd say it would be
 better to have this in a common place instead of every application
 implementing it for itself.

Don't we have KStandardDirs in some porting framework?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


Re: Configuration files transfer

2014-04-12 Thread David Faure
On Saturday 12 April 2014 12:08:12 Kevin Krammer wrote:
 On Saturday, 2014-04-12, 06:57:41, Ivan Čukić wrote:
   +for (const auto testSubdir: { .kde, .kde5 }) {
   Shouldn't that be .kde4?
  
  Yes, already fixed in the next commit. :)
  
   That block of code ($KDEHOME, otherwise ~/.kde, otherwise ~/.kde4)
   sounds
   like code that could be shared. Should we have a kde4ConfigHome() and
   kde4DataHome() in, hmm, kcoreaddons?
  
  That is why I asked the question in the first place. I'd say it would be
  better to have this in a common place instead of every application
  implementing it for itself.
 
 Don't we have KStandardDirs in some porting framework?

Yes, but
1) it's in kdelibs4support, deprecated, i.e. apps are supposed to port AWAY 
from it.
2) its logic has been ported away from KDEHOME and to 
XDG_DATA_HOME/XDG_CONFIG_HOME etc. instead. So that a KF5-based app still 
using KStandardDirs, would at least write into the right place.
So this isn't useful for migrating the KDE4 data.

Plus it's kind of overkill since it handles many levels for many resources 
while all we need is the local config and data dirs.

My suggestion is this instead: https://git.reviewboard.kde.org/r/117511/

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5


signature.asc
Description: This is a digitally signed message part.


Re: Configuration files transfer

2014-04-11 Thread David Faure
On Sunday 06 April 2014 19:29:43 Ivan Čukić wrote:
 On Friday 04 Apr 2014 21:36:11 Luca Beltrame wrote:
  David Faure wrote:
   Kevin Krammer had thoughts on the topic - iirc along the lines of every
   application should take care of migrating the relevant data ? (cc'ed)
  
  To give more context on this question: kactivities (KF5 based) can be used
  with a 4.x software stack, however it uses the XDG configuration paths
 
 Ok, I've pushed the manual transition of the configuration. If something
 else is decided at a later stage, I'll replace the code.

I took a look at commit c8f9c50e7ec in kactivities.

+for (const auto testSubdir: { .kde, .kde5 }) {
Shouldn't that be .kde4?


That block of code ($KDEHOME, otherwise ~/.kde, otherwise ~/.kde4) sounds like 
code that could be shared. Should we have a kde4ConfigHome() and 
kde4DataHome() in, hmm, kcoreaddons?

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



Re: Configuration files transfer

2014-04-11 Thread Ivan Čukić

 +for (const auto testSubdir: { .kde, .kde5 }) {
 Shouldn't that be .kde4?

Yes, already fixed in the next commit. :)

 That block of code ($KDEHOME, otherwise ~/.kde, otherwise ~/.kde4) sounds
 like code that could be shared. Should we have a kde4ConfigHome() and
 kde4DataHome() in, hmm, kcoreaddons?

That is why I asked the question in the first place. I'd say it would be 
better to have this in a common place instead of every application 
implementing it for itself.

Cheerio


-- 
You know, there are many people in the country today who,
through no fault of their own, are sane. Some of them were born sane.
Some of them became sane later in their lives...
  -- Monty Python's Flying Circus



Re: Configuration files transfer

2014-04-07 Thread Kevin Krammer
On Friday, 2014-04-04, 18:21:31, David Faure wrote:
 On Friday 04 April 2014 09:42:34 Ivan Čukić wrote:
  Hi all,
  
  Since we have changed the location of our config files not to use .kde
  anymore, we will need some way of moving the old configuration files to
  their new locations.
  
  Should we use kconf_update for this, or is something else in the works?
 
 Kevin Krammer had thoughts on the topic - iirc along the lines of every
 application should take care of migrating the relevant data ? (cc'ed)

I documented my look into this here (though more generalized, not just 
config):

http://community.kde.org/Frameworks/Epics/StandardPathsMigration

Application specific configs could be copied with an automated mechanism that 
has access to the porting aids framework and thus access to KStandardDirs.

Shared configs are obivously tricky, might need some symlink approach.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


Re: Configuration files transfer

2014-04-06 Thread Luca Beltrame
David Faure wrote:


 Kevin Krammer had thoughts on the topic - iirc along the lines of every
 application should take care of migrating the relevant data ? (cc'ed)

To give more context on this question: kactivities (KF5 based) can be used 
with a 4.x software stack, however it uses the XDG configuration paths 
rather than KDEHOME, hence currently it breaks configurations where both 
workspaces are installed (because it looks for files elsewhere and so it 
doesn't pick the old config up).

This is going to be a problem as distributions (I speak at least for 
openSUSE where I'm involved in) will offer the KF5-based workspace as an 
aside and not as main desktop. 

-- 
Luca Beltrame - KDE Forums team
KDE Science supporter
GPG key ID: 6E1A4E79




Re: Configuration files transfer

2014-04-06 Thread Ivan Čukić
On Friday 04 Apr 2014 21:36:11 Luca Beltrame wrote:
 David Faure wrote:
  Kevin Krammer had thoughts on the topic - iirc along the lines of every
  application should take care of migrating the relevant data ? (cc'ed)
 
 To give more context on this question: kactivities (KF5 based) can be used
 with a 4.x software stack, however it uses the XDG configuration paths

Ok, I've pushed the manual transition of the configuration. If something else 
is decided at a later stage, I'll replace the code.

Ch!


-- 
Those people who think they know everything are a great annoyance to those
of us who do.
  -- Isaac Asimov



Configuration files transfer

2014-04-04 Thread Ivan Čukić
Hi all,

Since we have changed the location of our config files not to use .kde 
anymore, we will need some way of moving the old configuration files to their 
new locations.

Should we use kconf_update for this, or is something else in the works?

Cheerio,
Ivan


-- 
Make your code readable. Pretend the next person who looks
at your code is a psychopath and they know where you live.
  -- Philip Wadler



Re: Configuration files transfer

2014-04-04 Thread David Faure
On Friday 04 April 2014 09:42:34 Ivan Čukić wrote:
 Hi all,
 
 Since we have changed the location of our config files not to use .kde
 anymore, we will need some way of moving the old configuration files to
 their new locations.
 
 Should we use kconf_update for this, or is something else in the works?

Kevin Krammer had thoughts on the topic - iirc along the lines of every 
application should take care of migrating the relevant data ? (cc'ed)

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5