[KPhotoAlbum] Automatic version 6 database upgrade
tobias.leupold at web.de
Mon Apr 13 11:35:37 BST 2015
Hi list :-)
I already wrote this in IRC, but perhaps, somebody on the list has the time to
test it and didn't read it.
It's about the version 6 database upgrade we introduced recently. Apparently,
users don't read or understand the upgrade announcement message on the first
start with a pre-v6-database and simply skip it -- and complain about lacking
To save us from "I skipped that update thingy because I didn't understand what
you want and now my tag thumbnails are gone" bug reports, I wrote some code to
do another approach. I pushed it in the automatic_dbv6_upgrade branch. Works
The code checks if the collection folder is writable. I'm pretty sure it's a
rare case "in the wild" that this it's not, but who knows?! In this case, the
update is skipped and a warning is displayed.
If we can write to the collection folder, a backup directory is created (in a
safe way, nothing will be overwritten). There, a backup of the index.xml, the
kphotoalbumrc and the whole CategoryImages directory is created. Just to be
Then, the update to v6 is done and the database is saved.
Finally, a message is displayed what was going on and that there's a backup
In this way, nobody will skip the (really necessary) fixes because he or she
doesn't read and/or understand the message. It would be really kind if some of
you would test if it works as expected. I'm pretty sure it does, but please
have a look at it, simply by starting KPA with a pre-v6 database.
If it's fine, I'd suggest that we do another bugfix release with this code
merged, before the distributors adopt/stabilize KPA 4.6.1. If we do it too
late, the user will already have started it and had "the chance" to not
understand and skip the update message. Apart from this, some other fixes have
been applied as well, so that 4.6.2 would not only fix the dbv6 upgrade.
Let me know what you think!
More information about the Kphotoalbum