xdg.eclass: drop unneeded old EAPI support
authorGilles Dartiguelongue <eva@gentoo.org>
Tue, 24 Nov 2015 18:45:59 +0000 (19:45 +0100)
committerGilles Dartiguelongue <eva@gentoo.org>
Tue, 24 Nov 2015 21:57:29 +0000 (22:57 +0100)
Should not have been there to start with since it is a new eclass.

eclass/xdg.eclass

index e804d18ace234383a21e9c7c97bba86b4be169f6..2ad0adab31d2d7d4f4128a372ecae67546ef505a 100644 (file)
@@ -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