Fix the code from bug #267104 to account non-root users.
authorZac Medico <zmedico@gentoo.org>
Wed, 29 Apr 2009 05:03:45 +0000 (05:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 29 Apr 2009 05:03:45 +0000 (05:03 -0000)
svn path=/main/trunk/; revision=13408

pym/portage/__init__.py

index 5a0f86da20b9bb7d97b76ffba69be6a35cd21a6a..d852efe782e3749c5ca91f664c415e1dc84370fd 100644 (file)
@@ -3947,7 +3947,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                        mysize = 0
                                if (size - mysize + vfs_stat.f_bsize) >= \
                                        (vfs_stat.f_bsize * vfs_stat.f_bavail):
-                                       if 'userfetch' in features:
+                                       if secpass < 2:
+                                               has_space = False
+                                       elif userfetch:
                                                has_space = False
                                        elif (size - mysize + vfs_stat.f_bfree) >= \
                                                (vfs_stat.f_bfree * vfs_stat.f_bavail):