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 331468 - Failure importing bookmarks exported from previous release
Failure importing bookmarks exported from previous release
Status: RESOLVED NOTGNOME
Product: epiphany
Classification: Core
Component: Bookmarks
git master
Other All
: Normal normal
: 2.14.x
Assigned To: Christian Neumair
Marco Pesenti Gritti
Depends on:
Blocks:
 
 
Reported: 2006-02-16 21:43 UTC by Luca Ferretti
Modified: 2006-03-03 11:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
My bookmarks exported as RTF (47.37 KB, text/rdf)
2006-02-22 07:25 UTC, Luca Ferretti
  Details
My bookmarks exported as Mozilla Bookmarks (22.22 KB, application/x-mozilla-bookmarks)
2006-02-22 07:29 UTC, Luca Ferretti
  Details
Patch against your /usr/share/mime/packages/freedesktop.org.xml file (503 bytes, patch)
2006-03-02 20:27 UTC, Christian Neumair
reviewed Details | Review

Description Luca Ferretti 2006-02-16 21:43:05 UTC
Please describe the problem:
I tried to export bookmarks in epiphany (RDF) format under my "stable" user
(using Ubuntu 5.10), then importing them in my test HEAD GNOME installation
under /opt (builded with jhbuild).

The import action fails

Steps to reproduce:
1. Export your bookmark with the previous stable release as RDF
2. Try to import them in the current development release
3. The import fails


Actual results:
Import failure error dialog

"The bookmarks from “Segnalibri.rdf” could not be imported because the file is
corrupted or of an unsupported type."

Expected results:
Import my bookmarks, please :-|

Does this happen every time?
Yes

Other information:
Just a doubt: what will happen when I'll upgrade my Ubuntu to 6.04? Will I lost
my bookmarks?
Comment 1 Christian Persch 2006-02-16 21:59:28 UTC
When you run 
 xmllint --noout ~/.gnome2/epiphany/bookmarks.rdf && echo valid
does it output "valid" ?
Comment 2 Luca Ferretti 2006-02-17 08:55:24 UTC
Both environments (/usr and /opt/gnome2) say it's valid...

Same for saved rdf file. 
Comment 3 Christian Persch 2006-02-21 20:27:54 UTC
I guess we'd need to see the bookmarks.rdf file... if you want you could strip the real string, but the structure needs to be conserved; it should be easy to write a tiny script to do that.
Comment 4 Luca Ferretti 2006-02-22 07:25:38 UTC
Created attachment 59905 [details]
My bookmarks exported as RTF

Source: Epiphany 1.8.2 in Ubuntu 5.10
Contents: no p0rN sites :-> All addresses for p0rN stuff are in my mind :-)
Comment 5 Luca Ferretti 2006-02-22 07:29:13 UTC
Created attachment 59906 [details]
My bookmarks exported as Mozilla Bookmarks

Same as previous attachment, exported as Mozilla bookmarks in Epiphany 1.8.2 in Ubuntu.

Epiphany HEAD fails to load this file too (same error message). Moreover, using the file type filter in file selection dialog for import bookmarks action and setting it to "Mozilla/Firefox bookmaks", this file is not showed in file list. A MIME type mismatch?
Comment 6 Christian Persch 2006-02-24 19:36:37 UTC
I can import the test file just fine....

What does the gnomevfs-info command report as mime type of the file for you? It should be text/rdf or application/rdf+xml.
Comment 7 Luca Ferretti 2006-02-24 20:44:32 UTC
gnomevfs-info says it's text/rdf. 

Nautilus file properties dialog says it's application/xml (???). I'll investigate about used mime info (maybe a wrong $XDG_* variable?)
Comment 8 Christian Persch 2006-02-24 20:54:18 UTC
Try running under gdb and set a breakpoint on ephy-bookmarks-import.c:79 and print the value of the "type" variable?
Comment 9 Luca Ferretti 2006-02-26 17:55:48 UTC
I tried to run gdb, but epiphany crash running in it. Do I miss something?
    
  betatester@redrum:~$ gdb /opt/gnome2/bin/epiphany
  <...>
  (gdb) break ephy-bookmarks-import.c:79
  (gdb) run
  <...>
  Program received signal SIG33, Real-time event 33.
  [Switching to Thread -1257833552 (LWP 21969)]
  0xffffe410 in __kernel_vsyscall ()

Comment 10 Luca Ferretti 2006-02-26 18:25:02 UTC
I tried to attach gdb to a running `epiphany --bookmarks` too. The window hangs up after all symbols are loaded, this the traceback.

(gdb) thread apply all bt

Thread 1 (Thread -1229846176 (LWP 23251))

  • #0 __kernel_vsyscall
  • #1 poll
    from /lib/tls/i686/cmov/libc.so.6
  • #2 g_main_context_iterate
    at gmain.c line 2849
  • #3 IA__g_main_loop_run
    at gmain.c line 2751
  • #4 IA__gtk_main
    at gtkmain.c line 991
  • #5 main
    at ephy-main.c line 716
  • #0 __kernel_vsyscall

Comment 11 Christian Persch 2006-02-26 18:26:27 UTC
Put this line in ~/.gdbinit file:

handle SIG33 nostop noprint pass
Comment 12 Luca Ferretti 2006-02-28 14:15:10 UTC
(gdb) print type
$1 = 0x83269c0 "application/xml"


So it could be a misconfiguration of my system (or stuff under /opt/)...
Comment 13 Christian Neumair 2006-03-02 20:24:56 UTC
Thanks for your debugging efforts, marking as NOTGNOME.
Your problem is that the MIME type "text/rdf" is marked as a MIME type derived from "text/plain" instead of "application/xml". I've fixed that in shared-mime-info HEAD.
Comment 14 Christian Neumair 2006-03-02 20:27:59 UTC
Created attachment 60517 [details] [review]
Patch against your /usr/share/mime/packages/freedesktop.org.xml file

You can apply the attached patch to fix the issue, or wait until your distributor ships with a more recent version.
Comment 15 Luca Ferretti 2006-03-03 09:37:01 UTC
Updated shared-mime-info from CVS. Now bookmarks are gracefully imported (don't you think is better provided a new shared-mime-info package before GNOME 2.14 release?)

OK to close the bug?
Comment 16 Christian Neumair 2006-03-03 11:05:23 UTC
> don't you think is better provided a new shared-mime-info package before GNOME 2.14 release?

I agree. I'll contact the maintainers.

> OK to close the bug?

Yes.