Bug 193522

Summary: first run (with existing v3 database) fails, "No album library path..."
Product: [Applications] digikam Reporter: Jonathan Marten <jjm>
Component: Setup-DatabaseAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, marcel.wiesweg
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 1.0.0

Description Jonathan Marten 2009-05-21 16:48:00 UTC
Version:           0.11.0-svn (rev.: 968562) (using Devel)
OS:                Linux
Installed from:    Compiled sources

Started the KDE4 version of digikam for the very first time, with no existing config file or database.  On the second page of the first run wizard, entered "/share/photos" for the image store location and accepted the default "/home/jjm/Pictures" for the database location.  /share/photos is an NFS directory containing nothing but my images, /home/jjm/Pictures contains the existing 'digikam3.db' database.

Accepted the defaults on all of the other wizard pages.  After clicking "Finish", the error message was displayed:

---------------------------------------------------
No album library path has been found in the configuration file. Giving up the schema updating process. Please try with an empty database, or repair your configuration.
---------------------------------------------------

Running digikam for the second time produced the same error message.  The contents of ~/.kde4/share/config/digikamrc at this stage are:

---------------------------------------------------
[Album Settings]
Database File Path=/home/jjm/Pictures
Item Right Click Action=0
Preview Load Full Image Size=false
Show Album ToolTips=false
Show ToolTips=false

[General Settings]
Version=0.11.0-svn

[ImageViewer Settings]
UseRawImportTool=false

[LightTable Settings]
Load Full Image size=false

[Metadata Settings]
Save Date Time=false
Save EXIF Comments=false
Save Rating=false
Save Tags=false
---------------------------------------------------

stderr output while running digikam (for the first run with no existing config file) is:

---------------------------------------------------
digikam(16906) Digikam::CollectionPage::CollectionPage: "/home/jjm/Pictures"
digikam(16906)/digikam (core) Digikam::CollectionPage::checkRootAlbum: Root album is :  "/home/jjm/Pictures"
digikam(16906)/digikam (core) Digikam::CollectionPage::checkDatabase: DB folder is :  "/home/jjm/Pictures"
digikam(16906)/digikam (core) main: Database Path:  "/home/jjm/Pictures"
digikam(16906)/digikam (core) Digikam::SchemaUpdater::update: SchemaUpdater update
digikam(16906)/digikam (core) Digikam::SchemaUpdater::startUpdates: No database file available
digikam(16906)/digikam (core) Digikam::SchemaUpdater::makeUpdates: makeUpdates  4  to  5
digikam(16906)/digikam (core) Digikam::SchemaUpdater::updateV4toV5: updateV4toV5
digikam(16906)/digikam (core) Digikam::SchemaUpdater::updateV4toV5: Moved tables
digikam(16906)/digikam (core) Digikam::SchemaUpdater::updateV4toV5: Dropped triggers
digikam(16906)/digikam (core): Album library path from config file is empty. Aborting update.
---------------------------------------------------

Editing the digikamrc config file manually to add the entry

---------------------------------------------------
Album Path=/share/photos
---------------------------------------------------

to the [Album Settings] section correctly performs the database upgrade and starts the digikam application.
Comment 1 caulier.gilles 2009-05-21 17:23:29 UTC
Marcel,

I can confirm this dysfunction. Just tried with my collection here.

Gilles
Comment 2 Marcel Wiesweg 2009-05-21 18:35:31 UTC
Probably related to bug #183972. This check needs to be removed.
Comment 3 Marcel Wiesweg 2009-07-25 16:53:07 UTC
There some possible scenarios for which the update process does not work, but all of these are non-standard scenarios. 
With digikam 0.9 the database must be in the same location of the pictures, and the location of the pictures was not stored in the database. For this simple reason we rely on the only parameter that tells us this location, which is the config value written by digikam 0.9. 
Your scenario is non-standard because 1) you have no digikamrc although you used digikam before 2) your database is not located in the same directory as your pictures. The digikam3.db in your given db directory may be completely unrelated to the pictures directory you gave. But I am thinking about a workaround.
Comment 4 Marcel Wiesweg 2009-07-25 19:19:12 UTC
SVN commit 1002330 by mwiesweg:

Add workaround for the corner case described in this bug report

BUG: 193522

 M  +3 -1      NEWS  
 M  +45 -0     digikam/albummanager.cpp  
 M  +3 -0      digikam/albummanager.h  
 M  +2 -0      digikam/main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1002330