trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: July 2012

Re: [trinity-devel] Migration script

From: Julius Schwartzenberg <julius.schwartzenberg@...>
Date: Sun, 22 Jul 2012 20:36:38 +0200
Darrell Anderson wrote:
>> It seems the migration script is being ran every single time I log on
>> now. As a result, I see nothing on the screen for a long
>> period of time. After a while a dialog pops up, which indicates there is an
>> issue with some desktop link files in my profile.
>>
>> Could somehow the migration process be announced/displayed/indicated so
>> that it is clear what is going on? Why could the script have
>> problems with updating desktop links inside my profile? The
>> diagnostic information seems limited.
> 
> Just to make sure we are talking about the same script, the migration script is called migratedkde3 and converts an existing KDE3 profile directory to Trinity. The migratekde3 script is not run from anywhere and has to be run manually. Using the script is intended to be optional.
> 
> The r14-xdg-update script updates profile configuration files with recent XDG changes and is intended to be run only once from starttde.
> 
> I believe you are referring to the r14-xdg-update script. :-)

Correct!


> When the r14-xdg-update script is run, the stdout messages should appear in the user's xsession log. X popup dialogs appear when a validation test fails. At this point of development, the popup means either the updating failed or the test used to validate the update is incorrect or flawed.

The only output I see there (I guess the -e is a small bug?).
[r14-xdg-update] -e Performing a profile update for Trinity release R14
XDG compliance.
[r14-xdg-update] -e Updating *.desktop files.
[r14-xdg-update] -e Updating references of
/opt/trinity/share/applications/kde to share/applications/tde.
[r14-xdg-update] -e Updating user-defined keyboard shortcuts in khotkeysrc.
[r14-xdg-update] -e Updating user-defined app prefernces in profilerc.
[r14-xdg-update] -e Updating kicker/panel customizations in kickerrc.
[r14-xdg-update] Updating Autostart files.


> If there are any failures that prevent the script from creating a "true" key entry in kdeglobals, then yes, the script gets run every time a user runs starttde. As there currently only a handful of us running Trinity from GIT, there are only a few us actually testing this process. :-)
> 
> Seems we have two problems to resolve here. One, what file(s) in your profile are proving problematic and don't update as expected, or are updating but the validation test fails to recognize? We need more information about that to revise the script for corner cases. We need to know the exact dialog message string, which will help know which section is failing.
> 
> Two, I'm open to any improvement ideas. :-) Originally I thought about popping a dialog that the update is starting, but I decided against that because for a significant majority of people the changes should work transparently and there is no need to bother users with dialogs for this one-time update.
> 
> There is an exception right now, of course, because the script is still considered beta and bugs are likely.
> 
> I still lean that way toward no dialog for the first-time run. Therefore I revised the script so that when one of the update snippets fail, the script tags the kdeglobals key with validation test failure rather than "true" or "false." Then with the next login the script displays a dialog that the script is running again and will run every time unless the problem is resolved, and to notify an administrator or take appropriate adminstrative action.
> 


> "Some Trinity profile R14 XDG compliance updates failed.\n\n(Check *.desktop files for 'KDE;'.)"
> 
> For the former message, we need to know which link could not be created and then post a copy of that link. For the latter message, perform the following in your profile:
> 
> find "$PROFILE_DIR" -name "*.desktop" -exec grep -l "KDE;" {} \;

That is the message I get indeed. I ran this command:
find /home/julius/.trinity/ -name "*.desktop" -exec grep -l "KDE;" {} \;

But there was no output. Here is a screenshot of it:
https://lh3.googleusercontent.com/--uMdK0xwgtU/UAxGk6mg6AI/AAAAAAAAA6Y/8spltYcrKjI/s731/r14-xdg-update.png


> I added some quotation marks in the link snippet and possibly that might resolve your specific failure. Without the quotation marks the ln command could not resolve spaces in file names.
> 
> I pushed the script changes in commit 81dc4c09. You don't need to rebuild a new tdebase package: grab the latest copy of r14-xdg-update from GIT and simply copy to $PREFIX/bin.

I'll see if I can fetch the new script. I'm a bit surprised that the
script immediately starts executing when I run it now. This doesn't
really make it suitable for specific diagnosing or using it to update
another user's profile. Could it just display some instructions on how
it can be used when it's run without any parameters?

Thanks!
Julius