diff options
-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 |