user.eclass: Also permit using functions in pkg_*rm phases
authorMichał Górny <mgorny@gentoo.org>
Thu, 6 Jun 2019 16:32:20 +0000 (18:32 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 20 Jun 2019 08:16:47 +0000 (10:16 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/user.eclass

index 7592ee3bba23b1fcaf7032bc403ea3a8f48d156d..fc883c965352dda6c69722e2fc671f2c275843fe 100644 (file)
@@ -18,10 +18,10 @@ _USER_ECLASS=1
 # @USAGE: <calling func name>
 _assert_pkg_ebuild_phase() {
        case ${EBUILD_PHASE} in
-       setup|preinst|postinst) ;;
+       setup|preinst|postinst|prerm|postrm) ;;
        *)
                eerror "'$1()' called from '${EBUILD_PHASE}' phase which is not OK:"
-               eerror "You may only call from pkg_{setup,preinst,postinst} functions."
+               eerror "You may only call from pkg_{setup,{pre,post}{inst,rm}} functions."
                eerror "Package fails at QA and at life.  Please file a bug."
                die "Bad package!  $1 is only for use in some pkg_* functions!"
        esac