summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2015-11-24 19:45:59 +0100
committerGilles Dartiguelongue <eva@gentoo.org>2015-11-24 22:57:29 +0100
commit428f398d3d1a7825bf2ac6d8f15db57227bcd4e9 (patch)
tree02dbe4a4f1bed7190196388eec955eda15d4cd29
parentxdg.eclass: make XDG_ECLASS_* bash arrays and deal with spaces in path (diff)
downloadgentoo-428f398d3d1a7825bf2ac6d8f15db57227bcd4e9.tar.gz
gentoo-428f398d3d1a7825bf2ac6d8f15db57227bcd4e9.tar.bz2
gentoo-428f398d3d1a7825bf2ac6d8f15db57227bcd4e9.zip
xdg.eclass: drop unneeded old EAPI support
Should not have been there to start with since it is a new eclass.
-rw-r--r--eclass/xdg.eclass11
1 files changed, 4 insertions, 7 deletions
diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
index e804d18ace23..2ad0adab31d2 100644
--- a/eclass/xdg.eclass
+++ b/eclass/xdg.eclass
@@ -15,7 +15,7 @@
inherit xdg-utils
case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
+ 4|5|6)
EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm
;;
*) die "EAPI=${EAPI} is not supported" ;;
@@ -41,22 +41,19 @@ xdg_src_prepare() {
# Locations are stored in XDG_ECLASS_DESKTOPFILES and XDG_ECLASS_MIMEINFOFILES
# respectively.
xdg_pkg_preinst() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" > /dev/null || die
-
local f
+
XDG_ECLASS_DESKTOPFILES=()
while IFS= read -r -d '' f; do
XDG_ECLASS_DESKTOPFILES+=( ${f} )
- done < <(find 'usr/share/applications' -type f -print0 2>/dev/null)
+ done < <(cd "${D}" && find 'usr/share/applications' -type f -print0 2>/dev/null)
XDG_ECLASS_MIMEINFOFILES=()
while IFS= read -r -d '' f; do
XDG_ECLASS_MIMEINFOFILES+=( ${f} )
- done < <(find 'usr/share/mime' -type f -print0 2>/dev/null)
+ done < <(cd "${D}" && find 'usr/share/mime' -type f -print0 2>/dev/null)
export XDG_ECLASS_DESKTOPFILES XDG_ECLASS_MIMEINFOFILES
- popd > /dev/null || die
}
# @FUNCTION: xdg_pkg_postinst