Bug #217122 - When waiting for a parallel-fetch download to complete,
authorZac Medico <zmedico@gentoo.org>
Thu, 10 Apr 2008 20:36:13 +0000 (20:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 10 Apr 2008 20:36:13 +0000 (20:36 -0000)
show a more friendly and informative message.

svn path=/main/trunk/; revision=9815

pym/portage/__init__.py

index 64414077a97a00b7091b3c31ad860db417ba6c21..a622439aa5957c70d61aa12dd9c4c8431761f0ac 100644 (file)
@@ -3298,8 +3298,15 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                        if use_locks and can_fetch:
                                waiting_msg = None
                                if not parallel_fetchonly and "parallel-fetch" in features:
-                                       waiting_msg = ("Downloading '%s'... " + \
-                                               "see /var/log/emerge-fetch.log for details.") % myfile
+                                       waiting_msg = ("Fetching '%s' " + \
+                                               "in the background. " + \
+                                               "To view fetch progress, run `tail -f " + \
+                                               "/var/log/emerge-fetch.log` in another " + \
+                                               "terminal.") % myfile
+                                       msg_prefix = colorize("GOOD", " * ")
+                                       from textwrap import wrap
+                                       waiting_msg = "\n".join(msg_prefix + line \
+                                               for line in wrap(waiting_msg, 65))
                                if locks_in_subdir:
                                        file_lock = portage.locks.lockfile(
                                                os.path.join(mysettings["DISTDIR"],