summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 19:48:31 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 19:48:31 +0000
commitdeef5c4a6a58b9f1572d322312a4cc7b98fe2cf5 (patch)
treefa09fe4bb34d2d0b9d08ee4ce81bb5218480f71f
parentFix _lazy_accept_license to discard || from the set of licenses. (trunk r13565) (diff)
downloadportage-multirepo-deef5c4a6a58b9f1572d322312a4cc7b98fe2cf5.tar.gz
portage-multirepo-deef5c4a6a58b9f1572d322312a4cc7b98fe2cf5.tar.bz2
portage-multirepo-deef5c4a6a58b9f1572d322312a4cc7b98fe2cf5.zip
Bug #267104 - When appropriate, advise the user that they may set FEATURES=
-userfetch in order to use remaining space. (trunk r13567) svn path=/main/branches/2.1.6/; revision=13568
-rw-r--r--pym/portage/__init__.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 3e6fff30..6e42e208 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3960,6 +3960,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
myfile_path = os.path.join(mysettings["DISTDIR"], myfile)
has_space = True
+ has_space_superuser = False
file_lock = None
if listonly:
writemsg_stdout("\n", noiselevel=-1)
@@ -3977,18 +3978,30 @@ 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):
- if secpass < 2:
+
+ if (size - mysize + vfs_stat.f_bsize) >= \
+ (vfs_stat.f_bsize * vfs_stat.f_bfree):
+ has_space_superuser = True
+
+ if not has_space_superuser:
has_space = False
- elif userfetch:
+ elif secpass < 2:
has_space = False
- elif (size - mysize + vfs_stat.f_bsize) >= \
- (vfs_stat.f_bsize * vfs_stat.f_bfree):
+ elif userfetch:
has_space = False
if not has_space:
writemsg("!!! Insufficient space to store %s in %s\n" % \
(myfile, mysettings["DISTDIR"]), noiselevel=-1)
+ if has_space_superuser:
+ writemsg("!!! Insufficient privileges to use " + \
+ "remaining space.\n", noiselevel=-1)
+ if userfetch:
+ writemsg("!!! You may set FEATURES=\"-userfetch\"" + \
+ " in /etc/make.conf in order to fetch with\n" + \
+ "!!! superuser privileges.\n", noiselevel=-1)
+
if distdir_writable and use_locks:
if locks_in_subdir: