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 626426 - During upgrade from 1.0 to 1.7 banshee corrupts the entire database with wrong paths
During upgrade from 1.0 to 1.7 banshee corrupts the entire database with wron...
Status: RESOLVED INCOMPLETE
Product: banshee
Classification: Other
Component: Metadata
1.7.3
Other Linux
: Normal normal
: 1.x
Assigned To: Andrés G. Aragoneses (IRC: knocte)
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-09 11:30 UTC by Philip Van Hoof
Modified: 2011-01-20 20:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to make 1.0 work with more modern mono compiler (12.98 KB, patch)
2010-08-09 18:07 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review

Description Philip Van Hoof 2010-08-09 11:30:58 UTC
When you upgrade your Banshee from 1.0 to 1.7, your *entire* database is corrupted because Banshee 1.7 transforms *all* paths of *all* files in its database from

file://home/pvanhoof/Music/Something.mp3

to

/home/pvanhoof/file:/home/pvanhoof/Music/Something.mp3

Which is of course totally wrong (even the file:/ would be wrong, so I don't even understand how it can ever get to these URLs).

I wonder how I can fix this manually :-(
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2010-08-09 11:40:51 UTC
1.0 is a really old version. At that time, paths on the database were of 2 kinds:

a) relative path to ~/Music/ if the file was inside that tree. Example: "Something.mp3"

b) absolute path if it was outside of ~/Music/. Example: "/media/someMountPoint/Music/Somewhat.mp3"

Thus, I cannot understand why your original paths where of the form you say. Are you sure you didn't mix up database versions somehow? If yes, can you provide us with the 1.0 database?
Comment 2 Philip Van Hoof 2010-08-09 11:45:44 UTC
Regretfully I only backed up .cache/banshee-1, not .config/banshee-1, so I can't give the original database anymore.

Apparently I also can't run the new banshee or import my files again, as I'm getting these errors at runtime:

[Warn  13:47:45.333] Caught an exception - System.IO.FileNotFoundException: Could not load file or assembly 'taglib-sharp, Version=2.0.3.7, Culture=neutral, PublicKeyToken=db62eba44689b5b0' or one of its dependencies. (in `Banshee.Services')
  at Banshee.Collection.Database.DatabaseImportManager.OnImportRequested (System.String path) [0x00000] 
  at Banshee.Collection.ImportManager+ImportElement.ProcessItem (System.String item) [0x00000] 

Yet I do have :

/opt/banshee/lib/mono/taglib-sharp/taglib-sharp.dll

No idea how to fix this :(
Comment 3 Philip Van Hoof 2010-08-09 11:51:48 UTC
OK, in the new Banshee 1.7 it looks like the path is correct, but I get this error when trying to play it:

(Banshee:501): Gtk-WARNING **: Refusing to add non-unique action 'Shuffle_score' to action group 'PlaybackShuffle'
[Info  13:55:53.635] nereid Client Started
[Error 13:55:57.741] GStreamer resource error: NotFound
[Warn  13:55:58.751] Seem to be stuck loading file:///home/pvanhoof/Music/Documents/Temp/Music/Aug/Ace%20Of%20Base%20-%20Wheel%20Of%20Fortune.mp3, so re-trying
[Error 13:55:58.837] GStreamer resource error: NotFound
[Error 13:55:59.357] GStreamer resource error: NotFound
[Error 13:55:59.755] GStreamer resource error: NotFound
[Error 13:56:00.140] GStreamer resource error: NotFound

No idea what these NotFound things are about.
Comment 4 Andrés G. Aragoneses (IRC: knocte) 2010-08-09 11:53:07 UTC
How did you install banshee? which distro?

(In reply to comment #2)
> Regretfully I only backed up .cache/banshee-1, not .config/banshee-1, so I
> can't give the original database anymore.

Can you go back to 1.0, create a small database of some files, do a copy of the database, and try to upgrade again so we replicate the bug again?

> Apparently I also can't run the new banshee or import my files again, as I'm
> getting these errors at runtime:

Let's try to focus on one issue per bug. Besides, that seems to be most likely a downstream packaging bug.
Comment 5 Philip Van Hoof 2010-08-09 11:56:22 UTC
Argh, ok, so my music was located at

/home/pvanhoof/Documents/Temp/Music

And Banshee 1.7 has rewritten all URLs to

/home/pvanhoof/Music/Documents/Temp/Music

mkdir ~/Music and then cd Music ; ln -s /home/pvanhoof/Documents . fixed it for me.

Now things work fine.

I think it's still a bug that Banshee 1.7 transformed the paths in the database to /home/pvanhoof/Music/$original_location if the files aren't really there at all.

So Comment #3 was caused by the same bug.
Comment 6 Andrés G. Aragoneses (IRC: knocte) 2010-08-09 18:07:54 UTC
Created attachment 167445 [details] [review]
Patch to make 1.0 work with more modern mono compiler

(In reply to comment #5)
> Argh, ok, so my music was located at
> 
> /home/pvanhoof/Documents/Temp/Music
> 
> And Banshee 1.7 has rewritten all URLs to
> 
> /home/pvanhoof/Music/Documents/Temp/Music
> 
> mkdir ~/Music and then cd Music ; ln -s /home/pvanhoof/Documents . fixed it for
> me.
> 
> Now things work fine.
> 
> I think it's still a bug that Banshee 1.7 transformed the paths in the database
> to /home/pvanhoof/Music/$original_location if the files aren't really there at
> all.

I tried to reproduce this. I checked out 1.0.0 code, patched it with this patch to make it compile with a higher version of the mono compiler, and imported some music from a folder with the same scheme as yours, then later run 1.7.0 to migrate the database, and everything was ok. Did I miss something?


> So Comment #3 was caused by the same bug.

Comment#3 seems to be related to a different issue.
Comment 7 Andrés G. Aragoneses (IRC: knocte) 2010-08-09 18:12:08 UTC
(In reply to comment #6)
> I tried to reproduce this. <snip/>...and everything was ok. Did I miss something?

At this point I guess this problem is also caused by your ancient mono version (1.9). Some bug in the Uri class may have caused this I guess.
Comment 8 Fabio Durán Verdugo 2010-12-08 02:46:35 UTC
any news for this report?
Comment 9 Fabio Durán Verdugo 2011-01-20 20:59:21 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!