mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
The GNOME team has committed the xdg-utils.eclass serving exactly the same purpose as fdo-mime.eclass, supposedly with the goal of replacing it. However, it seems that they have never bothered to actually hint the deprecation in the fdo-mime.eclass in any way. As a result, developers are still adding references to this eclass instead of using xdg-utils or xdg, and/or not working towards replacing them. Add an explicit deprecation notice to the fdo-mime.eclass to make it clear that the eclass should not be used in new packages, and what the replacement eclasses are.
40 lines
1.4 KiB
Bash
40 lines
1.4 KiB
Bash
# Copyright 1999-2017 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# @ECLASS: fdo-mime.eclass
|
|
# @MAINTAINER:
|
|
# freedesktop-bugs@gentoo.org
|
|
# @AUTHOR:
|
|
# Original author: foser <foser@gentoo.org>
|
|
# @BLURB: Utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
|
|
# @DESCRIPTION:
|
|
# This eclass is DEPRECATED. Please use xdg-utils or xdg instead.
|
|
|
|
# @FUNCTION: fdo-mime_desktop_database_update
|
|
# @DESCRIPTION:
|
|
# Updates the desktop database.
|
|
# Generates a list of mimetypes linked to applications that can handle them
|
|
fdo-mime_desktop_database_update() {
|
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
|
if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
|
|
then
|
|
einfo "Updating desktop mime database ..."
|
|
"${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}usr/share/applications"
|
|
fi
|
|
}
|
|
|
|
# @FUNCTION: fdo-mime_mime_database_update
|
|
# @DESCRIPTION:
|
|
# Update the mime database.
|
|
# Creates a general list of mime types from several sources
|
|
fdo-mime_mime_database_update() {
|
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
|
if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
|
|
then
|
|
einfo "Updating shared mime info database ..."
|
|
"${EPREFIX}/usr/bin/update-mime-database" "${EROOT}usr/share/mime"
|
|
fi
|
|
}
|