summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-11 10:27:44 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-11 10:27:44 -0700
commit79589ca29ecdbfafbc50b0899a51ce3f4eba1857 (patch)
treeaf98e6bab178f235deabf7449a9c163aeaa92f1c
parent12cb62465b130c21080281d78f7bfac077c17dfb (diff)
downloadportage-79589ca29ecdbfafbc50b0899a51ce3f4eba1857.tar.gz
portage-79589ca29ecdbfafbc50b0899a51ce3f4eba1857.tar.bz2
portage-79589ca29ecdbfafbc50b0899a51ce3f4eba1857.zip
fetch: tweak space msg for bug #386797
-rw-r--r--pym/portage/package/ebuild/fetch.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 9f6614837..43597ac7d 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -612,18 +612,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
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:
lock_kwargs = {}
@@ -727,6 +715,20 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
os.symlink(readonly_file, myfile_path)
continue
+ # this message is shown only after we know that
+ # the file is not already fetched
+ 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 fsmirrors and not os.path.exists(myfile_path) and has_space:
for mydir in fsmirrors:
mirror_file = os.path.join(mydir, myfile)