summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 07:29:25 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 07:29:25 +0000
commitc2bdf3c25adf23444794e358ec0cfda3ecd882de (patch)
tree8f58c2bf27e53fbbb108aed7fd3e759f4ecb8877
parentPut ebuild helpers at the absolute front of the PATH. (trunk r13404) (diff)
downloadportage-multirepo-c2bdf3c25adf23444794e358ec0cfda3ecd882de.tar.gz
portage-multirepo-c2bdf3c25adf23444794e358ec0cfda3ecd882de.tar.bz2
portage-multirepo-c2bdf3c25adf23444794e358ec0cfda3ecd882de.zip
Bug #267104 - If the statvfs f_bavail field shows insufficient free space and
userfetch is not enabled, recalculate using the f_bfree field. (trunk r13406) svn path=/main/branches/2.1.6/; revision=13546
-rw-r--r--pym/portage/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 6ed19bb7..632ed71c 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3937,8 +3937,15 @@ 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):
- writemsg("!!! Insufficient space to store %s in %s\n" % (myfile, mysettings["DISTDIR"]), noiselevel=-1)
- has_space = False
+ if 'userfetch' in features:
+ has_space = False
+ elif (size - mysize + vfs_stat.f_bfree) >= \
+ (vfs_stat.f_bfree * vfs_stat.f_bavail):
+ has_space = False
+
+ if not has_space:
+ writemsg("!!! Insufficient space to store %s in %s\n" % \
+ (myfile, mysettings["DISTDIR"]), noiselevel=-1)
if distdir_writable and use_locks: