Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:gnome-xdg-eclasses commit in: eclass/
Date: Tue, 24 Nov 2015 19:08:08
Message-Id: 1448392021.e7649a8af18c210b6141558dfb4840da04e90715.eva@gentoo
1 commit: e7649a8af18c210b6141558dfb4840da04e90715
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 24 18:45:59 2015 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 19:07:01 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7649a8a
7
8 xdg.eclass: drop unneeded old EAPI support
9
10 Should not have been there to start with since it is a new eclass.
11
12 eclass/xdg.eclass | 11 ++++-------
13 1 file changed, 4 insertions(+), 7 deletions(-)
14
15 diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
16 index e804d18..2ad0ada 100644
17 --- a/eclass/xdg.eclass
18 +++ b/eclass/xdg.eclass
19 @@ -15,7 +15,7 @@
20 inherit xdg-utils
21
22 case "${EAPI:-0}" in
23 - 0|1|2|3|4|5|6)
24 + 4|5|6)
25 EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm
26 ;;
27 *) die "EAPI=${EAPI} is not supported" ;;
28 @@ -41,22 +41,19 @@ xdg_src_prepare() {
29 # Locations are stored in XDG_ECLASS_DESKTOPFILES and XDG_ECLASS_MIMEINFOFILES
30 # respectively.
31 xdg_pkg_preinst() {
32 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
33 - pushd "${ED}" > /dev/null || die
34 -
35 local f
36 +
37 XDG_ECLASS_DESKTOPFILES=()
38 while IFS= read -r -d '' f; do
39 XDG_ECLASS_DESKTOPFILES+=( ${f} )
40 - done < <(find 'usr/share/applications' -type f -print0 2>/dev/null)
41 + done < <(cd "${D}" && find 'usr/share/applications' -type f -print0 2>/dev/null)
42
43 XDG_ECLASS_MIMEINFOFILES=()
44 while IFS= read -r -d '' f; do
45 XDG_ECLASS_MIMEINFOFILES+=( ${f} )
46 - done < <(find 'usr/share/mime' -type f -print0 2>/dev/null)
47 + done < <(cd "${D}" && find 'usr/share/mime' -type f -print0 2>/dev/null)
48
49 export XDG_ECLASS_DESKTOPFILES XDG_ECLASS_MIMEINFOFILES
50 - popd > /dev/null || die
51 }
52
53 # @FUNCTION: xdg_pkg_postinst