1 |
commit: 58eb01022e604b0a538b9d67bd64daa44da9f94a |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 19 06:38:21 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 19 06:42:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=58eb0102 |
7 |
|
8 |
Revert "fetch: check DISTDIR write access as fetch user (bug 601252)" |
9 |
|
10 |
This reverts commit 4264ac4b07c4555eb5db2ab21288dba05a7f4b6d. |
11 |
Dropping privileges for the access call is not useful by itself, |
12 |
since lock and unlink calls do not drop privileges yet. We might |
13 |
decide to drop privileges for the entire fetch function call. |
14 |
|
15 |
Bug: https://bugs.gentoo.org/601252 |
16 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
17 |
|
18 |
lib/portage/package/ebuild/fetch.py | 2 +- |
19 |
1 file changed, 1 insertion(+), 1 deletion(-) |
20 |
|
21 |
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py |
22 |
index 7ec7fe05e..0431e11ea 100644 |
23 |
--- a/lib/portage/package/ebuild/fetch.py |
24 |
+++ b/lib/portage/package/ebuild/fetch.py |
25 |
@@ -543,7 +543,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, |
26 |
|
27 |
if can_fetch and \ |
28 |
not fetch_to_ro and \ |
29 |
- _spawn_fetch(mysettings, ['test', '-w', mysettings["DISTDIR"]]) != os.EX_OK: |
30 |
+ not os.access(mysettings["DISTDIR"], os.W_OK): |
31 |
writemsg(_("!!! No write access to '%s'\n") % mysettings["DISTDIR"], |
32 |
noiselevel=-1) |
33 |
can_fetch = False |