GNOME Bugzilla – Bug 633242
Impact of commit 06758f1 (moving the .recently-used.xbel file)
Last modified: 2010-10-31 14:35:23 UTC
Commit 06758f1ab5e7a6fd97c6bff6041aca96743a13b6 moved the file away from /home without providing and backward compatibility because "we are breaking api anyway" the problem here is that gtk2 apps are still using the old location so the result is that gtk3 apps no longer see any recent apps from gtk2 apps and vice versa. I suggest reverting this rather cosmetic change as it causes a regression without a real gain anyway.
Created attachment 173306 [details] [review] Revert "recent-manager: Move the file under XDG_USER_DATA" This reverts commit 06758f1ab5e7a6fd97c6bff6041aca96743a13b6. This breaks interopability with gtk2 apps.
it is not a "cosmetic" change: location is important. I need to fix gtk2 to move over the file from $HOME to $XDG_DATA_DIR (or $XDG_CACHE_DIR), which is being worked on.
(In reply to comment #2) > it is not a "cosmetic" change: location is important. Well a change that not really affect functionality (neither fix any problem nor add a feature) like this one is by definition a cosmetic one. I didn't say that the new location is worse, in fact throwing stuff in ~ was a bad idea, but fixing it this way is just wrong. > I need to fix gtk2 to move over the file from $HOME to $XDG_DATA_DIR (or > $XDG_CACHE_DIR), which is being worked on. This kind of contradicts the text in the commit message, but if you are working on fixing it (i.e have gtk2 use the same file) its fine by me.
(In reply to comment #3) > > I need to fix gtk2 to move over the file from $HOME to $XDG_DATA_DIR (or > > $XDG_CACHE_DIR), which is being worked on. > > This kind of contradicts the text in the commit message, but if you are working > on fixing it (i.e have gtk2 use the same file) its fine by me. gtk3 should unconditionally move to the new location, since it's an API break anyway; gtk2 should have the migration path, since it's preparing the way to 3.0. hence the commit message.
(In reply to comment #4) > (In reply to comment #3) > > > > I need to fix gtk2 to move over the file from $HOME to $XDG_DATA_DIR (or > > > $XDG_CACHE_DIR), which is being worked on. > > > > This kind of contradicts the text in the commit message, but if you are working > > on fixing it (i.e have gtk2 use the same file) its fine by me. > > gtk3 should unconditionally move to the new location, since it's an API break > anyway; gtk2 should have the migration path, since it's preparing the way to > 3.0. hence the commit message. This has nothing to do with API, right? It's all about compatibility with the user's environment and multiple consumers of this file?
yes, it's not *strictly* API, though I consider changing the known location of a known storage file at least part of the ABI.
Created attachment 173553 [details] [review] recent-manager: Add migration to the new storage file location The recently-used.xbel file location has been moved from $HOME to $XDG_DATA_DIR, to be compliant with the desktop bookmark specification and with other desktop environments following it. The effective change was done in gtk+-3, but we need a migration path for gtk+-2. The possible cases are: • the old file is not present, so we just switch to the new one; • the old file is present, but the new one is not; in this case we rename the old file to the new one. • both the old file and the new file are present; in this case, we try a simple merge of the contents and remove the old file. The merge is the (obviously) more expensive option, but it should only happen once.
just tested the merge case and verified that attachment 173553 [details] [review] works as intended in a mixed gtk+-2 and gtk+-3 mixed environment.
Review of attachment 173306 [details] [review]: Marking as reject as the gtk2 patch seems to be the better way of fixing this.
Attachment 173553 [details] pushed to the gtk-2-24 branch.