diff options
author | Benda Xu <heroxbd@gentoo.org> | 2020-03-08 12:14:53 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2020-03-16 10:23:55 +0800 |
commit | 934685cc74127d88bb1dd17a479ce50cca20427c (patch) | |
tree | e8e287bd463e84d4010ab47dd8650e55b44b5882 /eclass | |
parent | media-video/ffmpeg: add ppc altivec patches to 4.2.2 (diff) | |
download | gentoo-934685cc74127d88bb1dd17a479ce50cca20427c.tar.gz gentoo-934685cc74127d88bb1dd17a479ce50cca20427c.tar.bz2 gentoo-934685cc74127d88bb1dd17a479ce50cca20427c.zip |
fcaps.eclass: skip fcaps() on Prefix.
Gentoo Prefix runs with a normal user and cannot grant extra
capabilities. Exit gracefully with a message.
Reference: https://archives.gentoo.org/gentoo-dev/message/4207cffd6b875450bb2fdbcf1b076053
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/fcaps.eclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass index 2b6e5be4683d..0bb23f8cca70 100644 --- a/eclass/fcaps.eclass +++ b/eclass/fcaps.eclass @@ -81,6 +81,11 @@ esac fcaps() { debug-print-function ${FUNCNAME} "$@" + if [[ ${EUID} != 0 ]] ; then + einfo "Insufficient privileges to execute ${FUNCNAME}, skipping." + return 0 + fi + # Process the user options first. local owner='root' local group='0' |