By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2202

Summary: Bad test for active session in migratekde3
Product: TDE Reporter: mgb-trinity
Component: tdebaseAssignee: Timothy Pearson <kb9vqf>
Status: VERIFIED FIXED    
Severity: normal CC: bugwatch, darrella, kb9vqf, mgb-trinity, michele.calgaro
Priority: P5    
Version: R14.0.x [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Patch for migratekde3 and r14-xdg-update
Updated patch to automatically run migratekde3

Description mgb-trinity 2014-11-21 17:07:30 CST
One of the disjunctions in the test for an active session is:

   [ -f $HOME/.DCOPserver_`uname -n`__* ]

There are three problems with this.

(1) There's a syntax error if more than one file matches the pattern.  This would be unusual but then why use "__*" instead of "__0".

(2) It thinks that a session is active when what is present is just a .DCOPserver file left over from a previous sesssion.  This is because it doesn't check that the pid in the file refers to a running DCOP server.

(3) This test is performed too late - after the symlink has already been deleted.
Comment 1 Timothy Pearson 2014-11-21 18:21:38 CST
Adding Darrell to CC list as he was one of the major authors of those scripts and he could probably clean this up quicker than I could. :-)
Comment 2 Darrell 2014-11-21 22:42:51 CST
Created attachment 2351 [details]
Patch for migratekde3 and r14-xdg-update

Two files are patched: migratekde3 and r14-xdg-update.

migratekde3 is patched to hopefully resolve the bugs addressed in this bug report.

r14-xdg-update is patched to hopefully resolve bug 2201 (no path for discovering migratekde3). The r14-xdg-update script now contains the full path to find migratekde3.

The migratekde3 patch moves the trap test for whether the user is trying to run migratekde3 during a live TDE session. The OR logic was changed to AND logic (three points define a line). The $HOME/.DCOPserver_`uname -n` test verifies the PID is still active.

When first starting TDE and the ugly dialog appears because $TDEHOME is sym linked, and the user selects to break the sym link (the user selects Continue), the user is thrown back to the login manager or command line and the sym link is broken. At that point the user needs to toggle to a console to run the migratekde3 script. Not fully intuitive.

At that point there is no $TDEHOME. Should the user not run migratekde3, a fresh/clean profile will be created the next time the user starts TDE.

When the sym link is retained (the user selects Quit), then starting TDE aborts, again sending the user back to the login manager or command line. This latter scenario is somewhat an endless loop until the user finally breaks the sym link one way or another.

A more robust approach would be to break the sym link when instructed by the user (the user selects Continue), the r14-xdg-update script then runs the migratekde3 script in the background, and when a new migrated $TDEHOME exists, continues running the remainder of the r14-xdg-update script. Seems I recall some discussion about that a long time ago, but perhaps I am recalling incorrectly.

I probably do not have time to provide that kind of robustness. For now that leaves users toggling to a console to run migratekde3, which is clunky but does work in my testing.

Then again, how many people are using a sym linked $TDEHOME? Are such users a far-end corner case or are there a sufficient number of users to warrant adding such robustness?

Testing the patch nominally requires a sym linked $TDEHOME profile and starting TDE. Full testing of the patch requires an actual KDE3 profile to test migratekde3.

More background discussion is available in bug 2201. Perhaps Slavek remembers additional details.
Comment 3 Darrell 2014-11-24 20:46:53 CST
Created attachment 2356 [details]
Updated patch to automatically run migratekde3

This updated patch modifies r14-xdg-update to automatically run the migratekde3 script when the user selects the Continue button. The patch includes changes to the dialog text.
Comment 4 Timothy Pearson 2014-11-25 17:03:13 CST
Comment on attachment 2356 [details]
Updated patch to automatically run migratekde3

Patch looks sane; pushed to GIT in 8498789.

I expect this will receive more testing in R14 RC2 as a result.
Comment 5 mgb-trinity 2014-12-10 20:11:15 CST
Fix verified in R14 RC2.

If you'd like to mark this RESOLVED FIXED I'll be happy to mark it VERIFIED.
Comment 6 Michele Calgaro 2018-08-02 09:28:35 CDT
Thanks mgb-trinity@yosemite.net!
Comment 7 mgb-trinity 2018-08-02 09:42:04 CDT
Verified.