Closed Bug 294375 Opened 15 years ago Closed 10 years ago

libgnomevfs-WARNING **: Deprecated function. User modifications to the MIME database are no longer supported.

Categories

(Core Graveyard :: File Handling, defect, minor)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: superbiskit, Assigned: reed)

References

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050515 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050515 Firefox/1.0.4

System: Debian (testing + some unstable) kernel 2.4.29-f3
Desktop: Gnome (2.8?)
Firefox: nightly/2005-05-15-06-aviary1.0.1
The following warnings were issued by the installer.
<quote>
mkdir: created directory `/opt/mozilla.org/firefox/2005-05-15-06-aviary1.0.1'
sashroot@Cobb028933918A-Tux:/tmp/install/firefox
[10:02:44] bash3 # cd firefox-installer
sashroot@Cobb028933918A-Tux:/tmp/install/firefox/firefox-installer
[10:03:14] bash3 # ./firefox-installer

(firefox-installer-bin:8801): Pango-WARNING **: Invalid UTF-8 string passed to
pango_layout_set_text()

(firefox-installer-bin:8801): Pango-WARNING **: Invalid UTF-8 string passed to
pango_layout_set_text()

(firefox-installer-bin:8801): Pango-WARNING **: Invalid UTF-8 string passed to
pango_layout_set_text()

(firefox-installer-bin:8801): Pango-WARNING **: Invalid UTF-8 string passed to
pango_layout_set_text()
sashroot@Cobb028933918A-Tux:/tmp/install/firefox/firefox-installer
[10:05:45] bash3 # *** loading the extensions datasource
*** loading the extensions datasource
*** loading the extensions datasource

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:9150): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

</quote>

Reproducible: Didn't try
the installer warnings (Invalid UTF-8 string...) were bug 257831 and have been
fixed.  I don't know about the gnomevfs ones, but they're from firefox itself
and not the installer.

try a trunk build (an alpha build for 1.1 should be available sometime this
week) to see if the gnomevfs stuff has already been fixed
Again.  INSTALLING Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2)
Gecko/20050605 Firefox/1.0+
===
*** Item Installed via directory addition to Install Location: app-global Item
ID: inspector@mozilla.org, attempting to register...
*** Item Installed/Upgraded at Install Location: app-global Item ID:
inspector@mozilla.org, attempting to register...
*** loading the extensions datasource
*** ... success, item is compatible

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:12003): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.
==
Re comment#1, the gnomevfs problem hasn't been addressed.  I could file it as a
real bug, if it is one.  But I haven't noted any loss of functionality.  There
seem to be mime content-type mapping problems, but I don't know how the mapping
is done yet to know who to blame.
==
If it is OK to do so, I will report HERE the messages I get from installing on a
more-or-less weekly basis, except when there are no warnings or other 'strangeness'.
ok, I'm just going to morph this a bit into the gnomevfs problem

==> file handling

also, it's important to keep one issue per bug (and one bug per issue), so if
you see any new issues (installer or otherwise) you should file a new bug.
Assignee: nobody → file-handling
Component: Installer → File Handling
Product: Firefox → Core
QA Contact: installer → ian
Summary: REPORTING: Warnings received when installing → libgnomevfs-WARNING **: Deprecated function. User modifications to the MIME database are no longer supported.
Version: unspecified → Trunk
bug 273524 changes how mozilla accesses gnomevfs, marking dependency
Depends on: 273524
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050621 Firefox/1.0+

Confirmed using a home-built DEBUG build on Linux, using GNOME 2.10.0. If I go
to Edit -> Preferences -> General -> Default Browser -> Check Now -> Yes then
this appears in the terminal:

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

(Gecko:7571): libgnomevfs-WARNING **: Deprecated function.  User modifications
to the MIME database are no longer supported.

and Deer Park asks me about the default browser setting every time. This is when
running with --profilemanager.
Status: UNCONFIRMED → NEW
Ever confirmed: true
It's been a while since this bug had any activity so I thought I might poke it and see what happens. I got this bug after a full source build of firefox 2.0.0.6 on slackware 12. It happens when ff tries to make itself the default browser. Because it fails, I get the confirmation box each and every time ff loads and I get the libgnomevfs-WARNING messages on the console along with it.
The initial error is
(Gecko:12391): libgnomevfs-WARNING **: Could not create per-user Gnome application-registry directory: /home/robertbw/.gnome/application-info

And it happens on SUSE10.1, running KDE, with firefox release 2.0.0.12

It's also reported as a bug over in Ubuntu land
https://bugs.launchpad.net/bugs/124015
I've added a bug report to gnome:gnome-vfs for the deprecation warnings and attached a patch that inserts the name of the deprecated function in the warning message.  Potentially, that'll make finding the source of this in mozilla (and multiple other programs) easier since folks will know what to look for.

Gnome-vfs bug # <a href="http://bugzilla.gnome.org/show_bug.cgi?id=527639">527639</a>.
I assume the culprit is nsIGnomeVFSService and friends, especially related to mime/file type handling. After some digging I've found that a lot has moved to GIO [1]. Especially [2] might be of interest

It will probably be a while until these functions really go away, but those services need to be updated.

[1] http://library.gnome.org/devel/gio/stable/index.html
[2] http://library.gnome.org/devel/gio/stable/GAppInfo.html

I might be looking into this at some point, but no promises.
Assignee: file-handling → nobody
QA Contact: ian → file-handling
Attached patch wip (obsolete) — Splinter Review
Assignee: nobody → reed
Status: NEW → ASSIGNED
Keywords: helpwanted
Attached patch patch - v1 (obsolete) — Splinter Review
ok, this compiles and works for me...
Attachment #398710 - Attachment is obsolete: true
Attachment #398734 - Flags: superreview?(roc)
Attachment #398734 - Flags: review?(ventnor.bugzilla)
question -- what about the icons/ copy code at http://mxr.mozilla.org/mozilla-central/source/browser/components/shell/src/nsGNOMEShellService.cpp#295 ? Why does only gnomevfs need it and not gio? Is it even still needed/used?
Attachment #398734 - Flags: review?(ventnor.bugzilla) → review?(mozbugz)
I don't understand how we can just get rid of all this code and have filename associations still work.
(In reply to comment #13)
> I don't understand how we can just get rid of all this code and have filename
> associations still work.

I'm hoping the work done in bug 273524 fixed that problem, but I could be horribly wrong.
(In reply to comment #14)
> (In reply to comment #13)
> > I don't understand how we can just get rid of all this code and have filename
> > associations still work.
> 
> I'm hoping the work done in bug 273524 fixed that problem, but I could be
> horribly wrong.

... and the work in bug 373397
Attachment #398734 - Flags: review?(mozbugz) → review-
Comment on attachment 398734 [details] [diff] [review]
patch - v1

I think getting rid of the baggage of the old GnomeVFSService methods is the
right thing to do.  There are a few reasons for this:

nsGNOMEShellService::IsDefaultBrowser() only tests the gconf settings for
appProtocols.  Most clients of SetDefaultBrowser() check IsDefaultBrowser
first.  (The exception is nsSetDefaultBrowser.js, but that only seems to get
run when -setDefaultBrowser is passed on the command line, which I don't
expect happens very often.)  This means that if any of the other (giovfs or
gnomevfs) settings are important, then the logic is already flawed.

gnome_vfs_mime_set_(default_application|icon|extensions_list) have done
nothing since GNOME 2.16 at least, and that is the oldest version that we
officially support.
http://svn.gnome.org/viewvc/gnome-vfs/branches/gnome-2-16/libgnomevfs/gnome-vfs-mime-handlers.c?revision=5230&view=markup
http://svn.gnome.org/viewvc/gnome-vfs/branches/gnome-2-16/libgnomevfs/gnome-vfs-mime-info.c?revision=5230&view=markup
http://www.mozilla.com/en-US/firefox/system-requirements.html

gnome_vfs_application_registry_* functions are even more deprecated than the
deprecated gnome_vfs_mime_set functions.  The application registry functions
do try to do something, but it will only succeed in saving settings if a
~/.gnome folder already exists.  (Otherwise
gnome_vfs_application_registry_init will fail to g_mkdir
"~/.gnome/application-info" and gnome_vfs_application_registry_sync will then
fail to g_fopen the "user.applications" file in that non-existant directory.)
Even if settings are saved, I doubt anything but the
gnome_vfs_application_registry will use the settings.
i.e. Even gnome_vfs_mime_* functions will not use the settings.


This would be an r+ but for a few small things:

(In reply to comment #12)
> question -- what about the icons/ copy code at
> http://mxr.mozilla.org/mozilla-central/source/browser/components/shell/src/nsGNOMEShellService.cpp#295
> ? Why does only gnomevfs need it and not gio? Is it even still needed/used?

Looking at bug 242254 comment 11, I suspect this was only used for
gnome_vfs_mime_set_icon, which does nothing, so this code can be removed.

>-                 
>+
> NS_IMETHODIMP
>-nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement, 
>+nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement,

Please leave harmless whitespace alone, so as to make archaeology easier.

>-  const char *mimeType = gnome_vfs_mime_type_from_name(fileExtToUse.get());
>+  const char *mimeType = gnome_vfs_get_mime_type_for_name(fileExtToUse.get());

Although gnome_vfs_get_mime_type_for_name is available from 2.14, Mozilla
should still run if libgnomevfs-2.so is older and gnome-vfs-service fails to
function.  XPCOM modules are loaded with RTLD_LAZY so, unless there is some
mechanism for detecting old libraries, the XPCOM mddule will load but the
missing symbol will not be detected until the relocation is attempted,
resulting in a crash.

As gnome-vfs development has ceased, we should just stick with
gnome_vfs_mime_type_from_name, which is still available.
Attached patch patch - v2 (obsolete) — Splinter Review
(In reply to comment #16)
> (In reply to comment #12)
> > question -- what about the icons/ copy code at
> > http://mxr.mozilla.org/mozilla-central/source/browser/components/shell/src/nsGNOMEShellService.cpp#295
> > ? Why does only gnomevfs need it and not gio? Is it even still needed/used?
> 
> Looking at bug 242254 comment 11, I suspect this was only used for
> gnome_vfs_mime_set_icon, which does nothing, so this code can be removed.

Ok, removed that code.

> >-                 
> >+
> > NS_IMETHODIMP
> >-nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement, 
> >+nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement,
> 
> Please leave harmless whitespace alone, so as to make archaeology easier.

Ok, removed that from the patch.

> >-  const char *mimeType = gnome_vfs_mime_type_from_name(fileExtToUse.get());
> >+  const char *mimeType = gnome_vfs_get_mime_type_for_name(fileExtToUse.get());
> 
> Although gnome_vfs_get_mime_type_for_name is available from 2.14, Mozilla
> should still run if libgnomevfs-2.so is older and gnome-vfs-service fails to
> function.  XPCOM modules are loaded with RTLD_LAZY so, unless there is some
> mechanism for detecting old libraries, the XPCOM mddule will load but the
> missing symbol will not be detected until the relocation is attempted,
> resulting in a crash.
> 
> As gnome-vfs development has ceased, we should just stick with
> gnome_vfs_mime_type_from_name, which is still available.

So, even though our minimal version supported is GNOME 2.16, we still want to support something that was deprecated in GNOME 2.14? Not sure I see a reason for this, especially when we want all this gnomevfs code gone anyway soon enough once everybody supports gio/gvfs. I left it alone, but I'd rather change it, if possible.
Attachment #398734 - Attachment is obsolete: true
Attachment #399165 - Flags: superreview?(roc)
Attachment #399165 - Flags: review?(mozbugz)
Attachment #398734 - Flags: superreview?(roc)
Comment on attachment 399165 [details] [diff] [review]
patch - v2

>+#include <libgnomevfs/gnome-vfs-mime-utils.h>

This shouldn't be needed now.  r+ with this removed.

(In reply to comment #17)
> So, even though our minimal version supported is GNOME 2.16, we still want
> to support something that was deprecated in GNOME 2.14?  Not sure I see a
> reason for this, especially when we want all this gnomevfs code gone anyway
> soon enough once everybody supports gio/gvfs. I left it alone, but I'd
> rather change it, if possible.

GNOME 2.16 is recommended "for optimal functionality" but it is not a
requirement to run Firefox.  I'm happy to lose functionality with older GNOME
libraries (i.e. not "support" them), but I don't want to crash just because an
older library happens to be present.

The decision seems easy here because there is no gain from using the new API,
which appears to be simply a cosmetic rename of the function.
Attachment #399165 - Flags: review?(mozbugz) → review+
Attachment #399165 - Flags: superreview?(roc) → superreview+
Attached patch what I landedSplinter Review
Attachment #399165 - Attachment is obsolete: true
http://hg.mozilla.org/mozilla-central/rev/bc5324d3f8fc
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Duplicate of this bug: 504645
Depends on: 713829
Depends on: 716424
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.