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
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 :/
(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.
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
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".
(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).
+ 03 Jun 2014; Alexandre Rostovtsev <tetromino@gentoo.org> + +targets/desktop/package.use.force: + Force dev-libs/glib[mime] for desktop profiles, see bug #511894
(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 ;)
(In reply to Samuli Suominen from comment #7) > actual server software rely upon glib to return correct info Can you give an example?
(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.
(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].
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.
(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).