diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2015-11-24 18:52:06 +0100 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2015-11-24 22:57:25 +0100 |
commit | 80eb2be65ae1daeee53ee497f12aa832ce6af1e0 (patch) | |
tree | d58883ea74cefb4d646d1a73103be9a8e7f3ae3f /eclass/xdg-utils.eclass | |
parent | xdg.eclass: use default in EAPI=6 instead of just eapply_user (diff) | |
download | gentoo-80eb2be65ae1daeee53ee497f12aa832ce6af1e0.tar.gz gentoo-80eb2be65ae1daeee53ee497f12aa832ce6af1e0.tar.bz2 gentoo-80eb2be65ae1daeee53ee497f12aa832ce6af1e0.zip |
xdg-utils.eclass: add phase check
Diffstat (limited to 'eclass/xdg-utils.eclass')
-rw-r--r-- | eclass/xdg-utils.eclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass index 5c765578f925..ff22b39ce110 100644 --- a/eclass/xdg-utils.eclass +++ b/eclass/xdg-utils.eclass @@ -69,6 +69,10 @@ xdg_environment_reset() { xdg_desktop_database_update() { local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" + if [[ ${EBUILD_PHASE} != post* ]] ; then + die "xdg_desktop_database_update must be used in pkg_post* phases." + fi + if [[ ! -x "${updater}" ]] ; then debug-print "${updater} is not executable" return @@ -86,6 +90,10 @@ xdg_desktop_database_update() { xdg_mimeinfo_database_update() { local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" + if [[ ${EBUILD_PHASE} != post* ]] ; then + die "xdg_mimeinfo_database_update must be used in pkg_post* phases." + fi + if [[ ! -x "${updater}" ]] ; then debug-print "${updater} is not executable" return |