After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633242 - Impact of commit 06758f1 (moving the .recently-used.xbel file)
Impact of commit 06758f1 (moving the .recently-used.xbel file)
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2010-10-27 08:14 UTC by drago01
Modified: 2010-10-31 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revert "recent-manager: Move the file under XDG_USER_DATA" (1.72 KB, patch)
2010-10-27 08:17 UTC, drago01
rejected Details | Review
recent-manager: Add migration to the new storage file location (6.22 KB, patch)
2010-10-30 14:15 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description drago01 2010-10-27 08:14:22 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.
Comment 1 drago01 2010-10-27 08:17:58 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2010-10-30 13:19:31 UTC
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.
Comment 3 drago01 2010-10-30 13:30:24 UTC
(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.
Comment 4 Emmanuele Bassi (:ebassi) 2010-10-30 13:39:11 UTC
(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.
Comment 5 Owen Taylor 2010-10-30 13:44:04 UTC
(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?
Comment 6 Emmanuele Bassi (:ebassi) 2010-10-30 14:07:30 UTC
yes, it's not *strictly* API, though I consider changing the known location of a known storage file at least part of the ABI.
Comment 7 Emmanuele Bassi (:ebassi) 2010-10-30 14:15:36 UTC
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.
Comment 8 Emmanuele Bassi (:ebassi) 2010-10-30 14:17:38 UTC
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.
Comment 9 drago01 2010-10-31 10:11:40 UTC
Review of attachment 173306 [details] [review]:

Marking as reject as the gtk2 patch seems to be the better way of fixing this.
Comment 10 Emmanuele Bassi (:ebassi) 2010-10-31 14:35:20 UTC
Attachment 173553 [details] pushed to the gtk-2-24 branch.