Try to create DISTDIR before disabling fetch due to it's nonexistence. Thanks to...
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Jan 2007 21:37:19 +0000 (21:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Jan 2007 21:37:19 +0000 (21:37 -0000)
svn path=/main/trunk/; revision=5448

pym/portage.py

index 3903d3dde9d14af68c8399215fdd8e70d31441e4..054cf537d29a7a55318fc3141370963cbf21a5c5 100644 (file)
@@ -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):