1 |
Author: zmedico |
2 |
Date: 2009-04-30 07:29:25 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13546 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/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. (trunk r13406) |
10 |
|
11 |
Modified: main/branches/2.1.6/pym/portage/__init__.py |
12 |
=================================================================== |
13 |
--- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:28:57 UTC (rev 13545) |
14 |
+++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:29:25 UTC (rev 13546) |
15 |
@@ -3937,9 +3937,16 @@ |
16 |
mysize = 0 |
17 |
if (size - mysize + vfs_stat.f_bsize) >= \ |
18 |
(vfs_stat.f_bsize * vfs_stat.f_bavail): |
19 |
- writemsg("!!! Insufficient space to store %s in %s\n" % (myfile, mysettings["DISTDIR"]), noiselevel=-1) |
20 |
- has_space = False |
21 |
+ if 'userfetch' in features: |
22 |
+ has_space = False |
23 |
+ elif (size - mysize + vfs_stat.f_bfree) >= \ |
24 |
+ (vfs_stat.f_bfree * vfs_stat.f_bavail): |
25 |
+ has_space = False |
26 |
|
27 |
+ if not has_space: |
28 |
+ writemsg("!!! Insufficient space to store %s in %s\n" % \ |
29 |
+ (myfile, mysettings["DISTDIR"]), noiselevel=-1) |
30 |
+ |
31 |
if distdir_writable and use_locks: |
32 |
|
33 |
if locks_in_subdir: |