Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511894 - dev-libs/glib: add USE=mime to control x11-misc/shared-mime-info dep
Summary: dev-libs/glib: add USE=mime to control x11-misc/shared-mime-info dep
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-30 20:56 UTC by SpanKY
Modified: 2014-06-05 19:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2014-05-30 20:56:54 UTC
from what i can see, the functionality used by glib for the mime stuff is fairly small.  it's reasonable to have it turned on by default for most people, but there are systems where it's just useless bloat.

what about putting it behind USE=mime ?

--- glib-2.40.0.ebuild  27 Apr 2014 16:17:10 -0000      1.1
+++ glib-2.40.0.ebuild  30 May 2014 20:56:21 -0000
@@ -15,7 +15,7 @@ SRC_URI="${SRC_URI}
 
 LICENSE="LGPL-2+"
 SLOT="2"
-IUSE="debug fam kernel_linux selinux static-libs systemtap test utils xattr"
+IUSE="debug fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
 KEYWORDS="..."
 
 # FIXME: want libselinux[${MULTILIB_USEDEP}] - bug #480960
@@ -56,7 +56,7 @@ DEPEND="${RDEPEND}
 # gobject-introspection blocker to ensure people don't mix
 # different g-i and glib major versions
 
-PDEPEND="x11-misc/shared-mime-info
+PDEPEND="mime? ( x11-misc/shared-mime-info )
        !<gnome-base/gvfs-1.6.4-r990"
 # shared-mime-info needed for gio/xdgmime, bug #409481
 # Earlier versions of gvfs do not work with glib

--- metadata.xml        23 Dec 2013 22:40:42 -0000      1.8
+++ metadata.xml        30 May 2014 20:56:21 -0000
@@ -3,6 +3,8 @@
 <pkgmetadata>
   <herd>gnome</herd>
   <use>
+       <flag name="mime">Pull in the normal mime database that many packages
+               want in order to properly detect and load files</flag>
        <flag name="systemtap">Build support for profiling and tracing using 
                <pkg>dev-util/systemtap</pkg></flag>
        <flag name="utils">Install gtester-report utility to generate test
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-05-30 21:59:26 UTC
sounds like a case for package.provided (like avoiding hwids would be for udev) as you pointed out, this cripples the file detection as well as eg. setting default apps like browser, mail client, terminal
i'd have to force USE=mime enabled from Xfce's ebuilds then at very least to prevent breakage, as would several hundred of other ebuilds :/
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-05-31 21:56:44 UTC
(In reply to Samuli Suominen from comment #1)
> sounds like a case for package.provided (like avoiding hwids would be for
> udev) as you pointed out, this cripples the file detection as well as eg.
> setting default apps like browser, mail client, terminal
> i'd have to force USE=mime enabled from Xfce's ebuilds then at very least to
> prevent breakage, as would several hundred of other ebuilds :/

Since this flag would only make sense for gui-less servers and embedded systems, I think a simple solution is to force-enable it in desktop profiles.
Comment 3 Pacho Ramos gentoo-dev 2014-06-01 11:47:30 UTC
other option could be to use some kind of "minimal" USE flag. Not sure if there is any USE flag for this kind of force really minimal behavior for "special" setups
Comment 4 SpanKY gentoo-dev 2014-06-02 18:41:55 UTC
i don't think the issue is limited to embedded systems which is why i don't think package.provided is the best answer.  iiuc, this makes sense on servers too which have no X at all.

having DE envs force it on (like GNOME/KDE/XFCE) seems like a reasonable trade off to minimizing impact on users.

i'm not a big fan of USE=minimal in general as it's basically a wild west of "this could literally do anything and varies wildly between packages".
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-06-03 04:21:58 UTC
(In reply to SpanKY from comment #4)

OK, then let's call it USE=mime instead of USE=minimal.

+  03 Jun 2014; Alexandre Rostovtsev <tetromino@gentoo.org>
+  glib-2.38.2-r1.ebuild, glib-2.40.0.ebuild, metadata.xml:
+  Make shared-mime-info an optional dependency for servers and embedded systems
+  (requested by vapier in bug #511894).
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-06-03 04:25:16 UTC
+  03 Jun 2014; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +targets/desktop/package.use.force:
+  Force dev-libs/glib[mime] for desktop profiles, see bug #511894
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-06-03 04:28:26 UTC
(In reply to SpanKY from comment #4)
> i don't think the issue is limited to embedded systems which is why i don't
> think package.provided is the best answer.  iiuc, this makes sense on
> servers too which have no X at all.

i don't see how this is related to X at all, glib is not a graphical toolkit library, shared-mime-info is not related to X in anyway, it's only in x11-misc/ because of historical reasons, because someone didn't think and threw it there
actual server software rely upon glib to return correct info

my 5 cent vocal opposition, which will surely be ignored ;)
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-06-03 04:37:29 UTC
(In reply to Samuli Suominen from comment #7)
> actual server software rely upon glib to return correct info

Can you give an example?
Comment 9 Rafael Martins (RETIRED) gentoo-dev 2014-06-03 15:07:37 UTC
(In reply to Alexandre Rostovtsev from comment #8)
> (In reply to Samuli Suominen from comment #7)
> > actual server software rely upon glib to return correct info
> 
> Can you give an example?

net-libs/balde relies on it to generate correct content-type headers for static files. It depends explicitly on shared-mime-info though, because there's a configure check for it, as most of the other distros aren't installing this package togheter with glib by default.
Comment 10 SpanKY gentoo-dev 2014-06-03 15:39:17 UTC
(In reply to Samuli Suominen from comment #7)

i'm aware it's not X-specific, but it seems like it's largely important to packages which are GUI based.  if there are packages that really want the mime logic to be working in glib, then i think it's reasonable to have it depend on glib[mime].
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-06-05 12:34:16 UTC
Note that headless servers such a UPnP server with rygel installed would simply fail to be any useful due to rygel not being able to load its plugins if mime support is off. Same for tracker indexing of said server.
Comment 12 SpanKY gentoo-dev 2014-06-05 19:33:06 UTC
(In reply to Gilles Dartiguelongue from comment #11)

so update the rygel ebuild to depend on the mime flag.  there are other upnp servers that work perfectly fine w/out this (like mediatomb).