1 |
Author: zmedico |
2 |
Date: 2009-04-29 00:16:10 +0000 (Wed, 29 Apr 2009) |
3 |
New Revision: 13406 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/__init__.py |
7 |
Log: |
8 |
Bug #267104 - If the statvfs f_bavail field shows insufficient free space and |
9 |
userfetch is not enabled, recalculate using the f_bfree field. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/__init__.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/__init__.py 2009-04-28 19:03:01 UTC (rev 13405) |
15 |
+++ main/trunk/pym/portage/__init__.py 2009-04-29 00:16:10 UTC (rev 13406) |
16 |
@@ -3947,9 +3947,16 @@ |
17 |
mysize = 0 |
18 |
if (size - mysize + vfs_stat.f_bsize) >= \ |
19 |
(vfs_stat.f_bsize * vfs_stat.f_bavail): |
20 |
- writemsg("!!! Insufficient space to store %s in %s\n" % (myfile, mysettings["DISTDIR"]), noiselevel=-1) |
21 |
- has_space = False |
22 |
+ if 'userfetch' in features: |
23 |
+ has_space = False |
24 |
+ elif (size - mysize + vfs_stat.f_bfree) >= \ |
25 |
+ (vfs_stat.f_bfree * vfs_stat.f_bavail): |
26 |
+ has_space = False |
27 |
|
28 |
+ if not has_space: |
29 |
+ writemsg("!!! Insufficient space to store %s in %s\n" % \ |
30 |
+ (myfile, mysettings["DISTDIR"]), noiselevel=-1) |
31 |
+ |
32 |
if distdir_writable and use_locks: |
33 |
|
34 |
if locks_in_subdir: |