1 |
commit: 0799fdf5c54ed473a45973eda6d3a63fd33fd7c9 |
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 18:49:39 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0799fdf5 |
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 3dc9e8e..10c8c42 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 |