Bug #228085 - In the event of a file collision, the explanation about the
authorZac Medico <zmedico@gentoo.org>
Sat, 26 Jul 2008 07:22:06 +0000 (07:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 26 Jul 2008 07:22:06 +0000 (07:22 -0000)
collision and how to solve it may not be visible via a scrollback buffer,
especially if the number of file collisions is large. Therefore, show a
summary at the end and refer the user to the elog messages.

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

pym/portage/dbapi/vartree.py

index 251f622315d4df1c967744e6ef0a67ada2a8811c..61d08f83c7ec41003e3664fed0d33cc6f1d4f49e 100644 (file)
@@ -2655,10 +2655,23 @@ class dblink(object):
                                for f in sorted(owned_files):
                                        msg.append("\t%s" % os.path.join(destroot,
                                                f.lstrip(os.path.sep)))
+                               msg.append("")
                                eerror(msg)
+
                        if not owners:
                                eerror(["None of the installed" + \
-                                       " packages claim the file(s)."])
+                                       " packages claim the file(s).", ""])
+
+                       # The explanation about the collision and how to solve
+                       # it may not be visible via a scrollback buffer, especially
+                       # if the number of file collisions is large. Therefore,
+                       # show a summary at the end.
+                       msg = ("Package '%s' NOT merged due to " + \
+                               "file collisions. If necessary, refer to your elog " + \
+                               "messages for the whole content of the above message.") % \
+                               self.settings.mycpv
+                       eerror(wrap(msg, 70))
+
                        if collision_protect:
                                return 1