summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-02 21:37:19 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-02 21:37:19 +0000
commitc0a375493e8b5dba97800fa2bfb7d60870919684 (patch)
treebe62ddd51d22abdfa6a638c77a8aacb553c18ae8
parent8254b3197ecc20fcb260159c9917b923ebaae6a2 (diff)
downloadportage-c0a375493e8b5dba97800fa2bfb7d60870919684.tar.gz
portage-c0a375493e8b5dba97800fa2bfb7d60870919684.tar.bz2
portage-c0a375493e8b5dba97800fa2bfb7d60870919684.zip
Try to create DISTDIR before disabling fetch due to it's nonexistence. Thanks to astinus for reporting.
svn path=/main/trunk/; revision=5448
-rw-r--r--pym/portage.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 3903d3dde..054cf537d 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2290,13 +2290,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
if not mysettings.get(var_name, None):
can_fetch = False
- if can_fetch and \
- not fetch_to_ro and \
- not os.access(mysettings["DISTDIR"], os.W_OK):
- writemsg("!!! No write access to '%s'\n" % mysettings["DISTDIR"],
- noiselevel=-1)
- can_fetch = False
-
if can_fetch:
dirmode = 02070
filemode = 060
@@ -2324,6 +2317,13 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
writemsg("!!! Directory Not Found: DISTDIR='%s'\n" % mysettings["DISTDIR"], noiselevel=-1)
writemsg("!!! Fetching will fail!\n", noiselevel=-1)
+ if can_fetch and \
+ not fetch_to_ro and \
+ not os.access(mysettings["DISTDIR"], os.W_OK):
+ writemsg("!!! No write access to '%s'\n" % mysettings["DISTDIR"],
+ noiselevel=-1)
+ can_fetch = False
+
if can_fetch and use_locks and locks_in_subdir:
distlocks_subdir = os.path.join(mysettings["DISTDIR"], locks_in_subdir)
if not os.access(distlocks_subdir, os.W_OK):