diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-04-29 00:16:10 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-04-29 00:16:10 +0000 |
commit | 24e136618fb48ada0cbc756235b8fd364fa845ad (patch) | |
tree | 0747ed3c021506aafa240bc8832f35dff666ef24 | |
parent | 5f038863db115b6c198981145baeadbc68240413 (diff) | |
download | portage-24e136618fb48ada0cbc756235b8fd364fa845ad.tar.gz portage-24e136618fb48ada0cbc756235b8fd364fa845ad.tar.bz2 portage-24e136618fb48ada0cbc756235b8fd364fa845ad.zip |
Bug #267104 - If the statvfs f_bavail field shows insufficient free space and
userfetch is not enabled, recalculate using the f_bfree field.
svn path=/main/trunk/; revision=13406
-rw-r--r-- | pym/portage/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ea04d5e87..5a0f86da2 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3947,8 +3947,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: |