Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13567 - main/trunk/pym/portage
Date: Thu, 30 Apr 2009 18:52:01
Message-Id: E1LzbMV-0000gN-Cu@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 18:51:58 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13567
4
5 Modified:
6 main/trunk/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.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2009-04-30 16:45:32 UTC (rev 13566)
15 +++ main/trunk/pym/portage/__init__.py 2009-04-30 18:51:58 UTC (rev 13567)
16 @@ -3970,6 +3970,7 @@
17
18 myfile_path = os.path.join(mysettings["DISTDIR"], myfile)
19 has_space = True
20 + has_space_superuser = False
21 file_lock = None
22 if listonly:
23 writemsg_stdout("\n", noiselevel=-1)
24 @@ -3987,18 +3988,30 @@
25 mysize = 0
26 if (size - mysize + vfs_stat.f_bsize) >= \
27 (vfs_stat.f_bsize * vfs_stat.f_bavail):
28 - if secpass < 2:
29 +
30 + if (size - mysize + vfs_stat.f_bsize) >= \
31 + (vfs_stat.f_bsize * vfs_stat.f_bfree):
32 + has_space_superuser = True
33 +
34 + if not has_space_superuser:
35 has_space = False
36 + elif secpass < 2:
37 + has_space = False
38 elif userfetch:
39 has_space = False
40 - elif (size - mysize + vfs_stat.f_bsize) >= \
41 - (vfs_stat.f_bsize * vfs_stat.f_bfree):
42 - has_space = False
43
44 if not has_space:
45 writemsg("!!! Insufficient space to store %s in %s\n" % \
46 (myfile, mysettings["DISTDIR"]), noiselevel=-1)
47
48 + if has_space_superuser:
49 + writemsg("!!! Insufficient privileges to use " + \
50 + "remaining space.\n", noiselevel=-1)
51 + if userfetch:
52 + writemsg("!!! You may set FEATURES=\"-userfetch\"" + \
53 + " in /etc/make.conf in order to fetch with\n" + \
54 + "!!! superuser privileges.\n", noiselevel=-1)
55 +
56 if distdir_writable and use_locks:
57
58 if locks_in_subdir: