1 |
commit: bb7f724185f344a656bbaf1df19f00f8265ea76d |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 5 21:16:43 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 5 21:17:32 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb7f7241 |
7 |
|
8 |
vim-plugin.eclass: simplify permission setting logic. |
9 |
|
10 |
We don't use Portage internal variables. Instead, we do away with that |
11 |
chunk of code and invoke fperms recursively on the directory with the |
12 |
right permission flags. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/469400 |
15 |
|
16 |
eclass/vim-plugin.eclass | 17 ++--------------- |
17 |
1 file changed, 2 insertions(+), 15 deletions(-) |
18 |
|
19 |
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass |
20 |
index abe9c7b3661..a0ba714f6e6 100644 |
21 |
--- a/eclass/vim-plugin.eclass |
22 |
+++ b/eclass/vim-plugin.eclass |
23 |
@@ -35,19 +35,6 @@ vim-plugin_src_install() { |
24 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" |
25 |
local f |
26 |
|
27 |
- if use !prefix && [[ ${EUID} -eq 0 ]] ; then |
28 |
- ebegin "Fixing file permissions" |
29 |
- # Make sure perms are good |
30 |
- chmod -R a+rX "${S}" || die "chmod failed" |
31 |
- find "${S}" -user 'portage' -exec chown root '{}' \; || die "chown failed" |
32 |
- if use userland_BSD || [[ ${CHOST} == *-darwin* ]] ; then |
33 |
- find "${S}" -group 'portage' -exec chgrp wheel '{}' \; || die "chgrp failed" |
34 |
- else |
35 |
- find "${S}" -group 'portage' -exec chgrp root '{}' \; || die "chgrp failed" |
36 |
- fi |
37 |
- eend $? |
38 |
- fi |
39 |
- |
40 |
# When globbing, if nothing exists, the shell literally returns the glob |
41 |
# pattern. So turn on nullglob and extglob options to avoid this. |
42 |
eshopts_push -s extglob |
43 |
@@ -85,8 +72,8 @@ vim-plugin_src_install() { |
44 |
mv "${S}" "${ED}"/usr/share/vim/vimfiles || die \ |
45 |
"couldn't move ${S} to ${ED}/usr/share/vim/vimfiles" |
46 |
|
47 |
- # Fix remaining bad permissions |
48 |
- chmod -R -x+X "${ED}"/usr/share/vim/vimfiles/ || die "chmod failed" |
49 |
+ # Set permissions |
50 |
+ fperms -R a+rX /usr/share/vim/vimfiles |
51 |
} |
52 |
|
53 |
# @FUNCTION: vim-plugin_pkg_postinst |