1 |
Author: zmedico |
2 |
Date: 2009-04-30 19:48:31 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13568 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/portage/__init__.py |
7 |
Log: |
8 |
Bug #267104 - When appropriate, advise the user that they may set FEATURES= |
9 |
-userfetch in order to use remaining space. (trunk r13567) |
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 18:51:58 UTC (rev 13567) |
14 |
+++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 19:48:31 UTC (rev 13568) |
15 |
@@ -3960,6 +3960,7 @@ |
16 |
|
17 |
myfile_path = os.path.join(mysettings["DISTDIR"], myfile) |
18 |
has_space = True |
19 |
+ has_space_superuser = False |
20 |
file_lock = None |
21 |
if listonly: |
22 |
writemsg_stdout("\n", noiselevel=-1) |
23 |
@@ -3977,18 +3978,30 @@ |
24 |
mysize = 0 |
25 |
if (size - mysize + vfs_stat.f_bsize) >= \ |
26 |
(vfs_stat.f_bsize * vfs_stat.f_bavail): |
27 |
- if secpass < 2: |
28 |
+ |
29 |
+ if (size - mysize + vfs_stat.f_bsize) >= \ |
30 |
+ (vfs_stat.f_bsize * vfs_stat.f_bfree): |
31 |
+ has_space_superuser = True |
32 |
+ |
33 |
+ if not has_space_superuser: |
34 |
has_space = False |
35 |
+ elif secpass < 2: |
36 |
+ has_space = False |
37 |
elif userfetch: |
38 |
has_space = False |
39 |
- elif (size - mysize + vfs_stat.f_bsize) >= \ |
40 |
- (vfs_stat.f_bsize * vfs_stat.f_bfree): |
41 |
- has_space = False |
42 |
|
43 |
if not has_space: |
44 |
writemsg("!!! Insufficient space to store %s in %s\n" % \ |
45 |
(myfile, mysettings["DISTDIR"]), noiselevel=-1) |
46 |
|
47 |
+ if has_space_superuser: |
48 |
+ writemsg("!!! Insufficient privileges to use " + \ |
49 |
+ "remaining space.\n", noiselevel=-1) |
50 |
+ if userfetch: |
51 |
+ writemsg("!!! You may set FEATURES=\"-userfetch\"" + \ |
52 |
+ " in /etc/make.conf in order to fetch with\n" + \ |
53 |
+ "!!! superuser privileges.\n", noiselevel=-1) |
54 |
+ |
55 |
if distdir_writable and use_locks: |
56 |
|
57 |
if locks_in_subdir: |