Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v4 11/19] user.eclass: Also permit using functions in pkg_*rm phases
Date: Tue, 11 Jun 2019 16:27:55
Message-Id: 20190611162347.2989-12-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH v4 00/19] User/group packages by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/user.eclass | 4 ++--
4 1 file changed, 2 insertions(+), 2 deletions(-)
5
6 diff --git a/eclass/user.eclass b/eclass/user.eclass
7 index 7592ee3bba23..fc883c965352 100644
8 --- a/eclass/user.eclass
9 +++ b/eclass/user.eclass
10 @@ -18,10 +18,10 @@ _USER_ECLASS=1
11 # @USAGE: <calling func name>
12 _assert_pkg_ebuild_phase() {
13 case ${EBUILD_PHASE} in
14 - setup|preinst|postinst) ;;
15 + setup|preinst|postinst|prerm|postrm) ;;
16 *)
17 eerror "'$1()' called from '${EBUILD_PHASE}' phase which is not OK:"
18 - eerror "You may only call from pkg_{setup,preinst,postinst} functions."
19 + eerror "You may only call from pkg_{setup,{pre,post}{inst,rm}} functions."
20 eerror "Package fails at QA and at life. Please file a bug."
21 die "Bad package! $1 is only for use in some pkg_* functions!"
22 esac
23 --
24 2.22.0