Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH python-utils-r1 4/4] Exit with 127 when banned command is called
Date: Sat, 25 Jul 2015 10:40:54
Message-Id: 1437820664-28757-5-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHSET python-utils-r1] python & python-config wrapper cleanup by "Michał Górny"
1 Exit with code 127 (used by shell as 'command not found') when banned
2 command is used. Probably doesn't make any difference but looks nicer.
3 ---
4 eclass/python-utils-r1.eclass | 2 +-
5 1 file changed, 1 insertion(+), 1 deletion(-)
6
7 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
8 index 2584f3e..5944f03 100644
9 --- a/eclass/python-utils-r1.eclass
10 +++ b/eclass/python-utils-r1.eclass
11 @@ -896,7 +896,7 @@ python_wrapper_setup() {
12 cat >"${workdir}"/bin/${x} <<__EOF__
13 #!/bin/sh
14 echo "${x} is not supported by ${EPYTHON}" >&2
15 -exit 1
16 +exit 127
17 __EOF__
18 chmod +x "${workdir}"/bin/${x} || die
19 done
20 --
21 2.4.6