Installing Gramps 5.1.6 after 5.2.2 causes Gramps configuration confusion

Environment: Windows 11, Gramps 5.2.2 and Gramps 5.1.6 official AIO builds.

On this PC with no prior Gramps installations, I installed Gramps 5.2.2 do genealogy work. Yesterday I wanted to test the behavior of some functionality in Gramps 5.1.6 so I installed it with the ‘just for me’ option during installation.

Gramps 5.1.6 launched and ran just fine; I created a family tree or two to test the issue and exited. Wanting to return to my family tree in 5.2.2, I launched it and noticed that there was a message in the console which seemed like something that should not have happened, but I had no choice:

WARNING:root:Importing old config file 'C:\Users\xyz\AppData\Roaming\gramps\gramps51\gramps.ini'...
WARNING:root:Done importing old config file 'C:\Users\xyz\AppData\Roaming\gramps\gramps51\gramps.ini'

When 5.2.2 launched, there were no family trees listed in the Family Tree Manager! After digging around a bit, I located that the original Gramps 5.2.2 configuration in

C:\Users\xyz\AppData\Local\gramps\grampsdb

And after the events above, the subsequent import of 5.1.6 config into 5.2.2 resulted in a new configuration being created in

C:\Users\xyz\AppData\Roaming\gramps\grampsdb

So I went into Gramps 5.2.2 Preferences > Family Tree and changed the Database Path back to the Local folder which now shows my family trees. However, the 3P addons I had installed and other configurations before installing 5.1.6 aren’t restored - there’s no setting that allows me to point to the configuration folder.

My first question is, how can I get Gramps 5.2.2 to look at all the configuration files in the original Local folder? I deleted the gramps52 folder in the Roaming folder, but Gramps 5.2.2 just recreates it rather than looking in the original Local folder. Somehow the presence of 5.1.6 is preventing 5.2.2 from even searching in the Local folder (may be a bug).

Gramps v5.2 will use the legacy directory layout if it detects an old installation. This makes upgrades easier.

Thanks, that confirms the behavior I’m experiencing and it makes sense as usually the upgrade path would be from older version to newer version. However, installing an older version later is also a scenario to expect for example, when old databases need to be revived, or for development and testing. Given that, what do you think about this startup flow?

On Gramps launch look for newer directory layout
  if present skip upgrade, use existing configuration
  else look for legacy directory layout; upgrade from previous version if required.

This would solve the issue I ran into. Do you see any issues with this logic?

The configuration files are unique to the major Gramps versions.

Your 5.1.6 program stores its configuration files in

C:\Users\xyz\AppData\Roaming\gramps\gramps51

the 5.2.2 program in

C:\Users\xyz\AppData\Local\gramps\gramps52

Even without the transition to appdata\local the 5.2 files would not share the same configuration files as 5.1.

Thanks to @ennoborg for the correction

Gramps is hard coded (gramps/gen/const.py) to store its config files in its version folder.

There is a way to set all Gramp installs to use a common user folder by setting the GRAMPSHOME environment in Windows. After setting this environment variable you would need to reinstall at least one of the Gramps versions if you point the variable to an existing directory.

FYI: I have set my GRAMPSHOME to c:\Users\Public\Genealogy. This creates the Gramps user directory \gramps\ here with its various version and database folders.

Note that any installed addons/plugins will also be unique to the Gramps version. The database/tree files are not backwards compatible. 5.1 will not open a 5.2 tree. 5.2 will convert a 5.1 database for its use.

This would be right, if you switched Local and Roaming. Old Gramps versions use Roaming, and Local is new, for 5.2.

I switched my GRAMPSHOME so long ago I forget which is which. Thank you for the correction.

Thanks for outlining your approach, @DaveSch; I will have to try that out. In the meanwhile let’s take this opportunity to explore a solution we could build into Gramps so other users don’t run into this.

When you installed 5.2.2 did you have any previous versions installed and their associated user directories? According to Nick, if you had a 5.1 version installed 5.2 should have stayed with the roaming user directories.

Before I belatedly realized you were not a new user, I took your timeline as that as a newbie. Installed 5.2.2 with the user files under local then installing 5.1.6 with the user files under roaming. Which I understood to be the problem.

@DaveSch I started on a system with no prior Gramps installation.

One additional question.

Did you launch and use 5.2.2 before installing and using 5.1.6? Launching 5.2.2 first would have created its gramps.ini. Once 5.2.2 had its gramps.ini file it should not have sought to import the 5.1.6’s gramps.ini.

I have no idea what may or may not be wrong with the code. Just trying to flesh out the steps to reproduce the problem.

@DaveSch Yes, I had been using 5.2.2 for several weeks before I needed to install 5.1.6. Steps should be reproducible according to the original post in this thread.

Based on what @Nick-Hall said in his reply, the change can be tracked to implementation of bug 8025, Support XDG base directory specification. I believe the flow I proposed in my reply to Nick should work, will need to try it out.

3 posts were merged into an existing topic: Questions from a potential new user on a Chromebook

Filed defect 0013261 to track this. Tested the proposed solution on Windows and it seems to work properly. I’ll put up a PR and hope to get it feedback from Linux/MacOS as well.

[Update] PR 1708 available for testing.

Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.