summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-11-05 22:16:43 +0100
committerPatrice Clement <monsieurp@gentoo.org>2017-11-05 22:17:32 +0100
commitbb7f724185f344a656bbaf1df19f00f8265ea76d (patch)
tree8aa814c6205f850ff805a77aa4421e76da59cf81 /eclass
parentsys-process/glances: version bump to 2.11.1. (diff)
downloadgentoo-bb7f724185f344a656bbaf1df19f00f8265ea76d.tar.gz
gentoo-bb7f724185f344a656bbaf1df19f00f8265ea76d.tar.bz2
gentoo-bb7f724185f344a656bbaf1df19f00f8265ea76d.zip
vim-plugin.eclass: simplify permission setting logic.
We don't use Portage internal variables. Instead, we do away with that chunk of code and invoke fperms recursively on the directory with the right permission flags. Closes: https://bugs.gentoo.org/469400
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vim-plugin.eclass17
1 files changed, 2 insertions, 15 deletions
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index abe9c7b3661..a0ba714f6e6 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -35,19 +35,6 @@ vim-plugin_src_install() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
local f
- if use !prefix && [[ ${EUID} -eq 0 ]] ; then
- ebegin "Fixing file permissions"
- # Make sure perms are good
- chmod -R a+rX "${S}" || die "chmod failed"
- find "${S}" -user 'portage' -exec chown root '{}' \; || die "chown failed"
- if use userland_BSD || [[ ${CHOST} == *-darwin* ]] ; then
- find "${S}" -group 'portage' -exec chgrp wheel '{}' \; || die "chgrp failed"
- else
- find "${S}" -group 'portage' -exec chgrp root '{}' \; || die "chgrp failed"
- fi
- eend $?
- fi
-
# When globbing, if nothing exists, the shell literally returns the glob
# pattern. So turn on nullglob and extglob options to avoid this.
eshopts_push -s extglob
@@ -85,8 +72,8 @@ vim-plugin_src_install() {
mv "${S}" "${ED}"/usr/share/vim/vimfiles || die \
"couldn't move ${S} to ${ED}/usr/share/vim/vimfiles"
- # Fix remaining bad permissions
- chmod -R -x+X "${ED}"/usr/share/vim/vimfiles/ || die "chmod failed"
+ # Set permissions
+ fperms -R a+rX /usr/share/vim/vimfiles
}
# @FUNCTION: vim-plugin_pkg_postinst