Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 24 Nov 2015 21:58:56
Message-Id: 1448402245.80eb2be65ae1daeee53ee497f12aa832ce6af1e0.eva@gentoo
1 commit: 80eb2be65ae1daeee53ee497f12aa832ce6af1e0
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 24 17:52:06 2015 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 21:57:25 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80eb2be6
7
8 xdg-utils.eclass: add phase check
9
10 eclass/xdg-utils.eclass | 8 ++++++++
11 1 file changed, 8 insertions(+)
12
13 diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
14 index 5c76557..ff22b39 100644
15 --- a/eclass/xdg-utils.eclass
16 +++ b/eclass/xdg-utils.eclass
17 @@ -69,6 +69,10 @@ xdg_environment_reset() {
18 xdg_desktop_database_update() {
19 local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}"
20
21 + if [[ ${EBUILD_PHASE} != post* ]] ; then
22 + die "xdg_desktop_database_update must be used in pkg_post* phases."
23 + fi
24 +
25 if [[ ! -x "${updater}" ]] ; then
26 debug-print "${updater} is not executable"
27 return
28 @@ -86,6 +90,10 @@ xdg_desktop_database_update() {
29 xdg_mimeinfo_database_update() {
30 local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}"
31
32 + if [[ ${EBUILD_PHASE} != post* ]] ; then
33 + die "xdg_mimeinfo_database_update must be used in pkg_post* phases."
34 + fi
35 +
36 if [[ ! -x "${updater}" ]] ; then
37 debug-print "${updater} is not executable"
38 return