From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SB8I8-0003xM-M5 for garchives@archives.gentoo.org; Fri, 23 Mar 2012 17:28:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE4D9E08EB; Fri, 23 Mar 2012 17:28:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7176BE08EB for ; Fri, 23 Mar 2012 17:28:37 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D5B2F1B4026 for ; Fri, 23 Mar 2012 17:28:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 98EF2E5403 for ; Fri, 23 Mar 2012 17:28:35 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1332523701.7c58705c30fed6b11f978c4880225ced8a45c70d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7c58705c30fed6b11f978c4880225ced8a45c70d X-VCS-Branch: master Date: Fri, 23 Mar 2012 17:28:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7aed62f4-ac61-4d15-b3e9-5a9f7b455bea X-Archives-Hash: 3a1ac9b0e5d65d6abb225e8830a3ced3 commit: 7c58705c30fed6b11f978c4880225ced8a45c70d Author: Zac Medico gentoo org> AuthorDate: Fri Mar 23 17:28:21 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Mar 23 17:28:21 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7c58705c Clarify symlink/dir collision for bug #409359. --- pym/portage/dbapi/vartree.py | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 0bcc947..3e603e2 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3661,6 +3661,21 @@ class dblink(object): self._collision_protect(srcroot, destroot, others_in_slot + blockers, myfilelist, mylinklist) =20 + if symlink_collisions: + # Symlink collisions need to be distinguished from other types + # of collisions, in order to avoid confusion (see bug #409359). + msg =3D _("Package '%s' has one or more collisions " + "between symlinks and directories, which is explicitly " + "forbidden by PMS section 13.4 (see bug #326685):") % \ + (self.settings.mycpv,) + msg =3D textwrap.wrap(msg, 70) + msg.append("") + for f in symlink_collisions: + msg.append("\t%s" % os.path.join(destroot, + f.lstrip(os.path.sep))) + msg.append("") + self._elog("eerror", "preinst", msg) + if collisions: collision_protect =3D "collision-protect" in self.settings.features protect_owned =3D "protect-owned" in self.settings.features @@ -3742,12 +3757,20 @@ class dblink(object): eerror([_("None of the installed" " packages claim the file(s)."), ""]) =20 + symlink_abort_msg =3D_("Package '%s' NOT merged since it has " + "one or more collisions between symlinks and directories, " + "which is explicitly forbidden by PMS section 13.4 " + "(see bug #326685).") + # 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. abort =3D False - if collision_protect: + if symlink_collisions: + abort =3D True + msg =3D symlink_abort_msg % (self.settings.mycpv,) + elif collision_protect: abort =3D True msg =3D _("Package '%s' NOT merged due to file collisions.") % \ self.settings.mycpv @@ -3755,12 +3778,6 @@ class dblink(object): abort =3D True msg =3D _("Package '%s' NOT merged due to file collisions.") % \ self.settings.mycpv - elif symlink_collisions: - abort =3D True - msg =3D _("Package '%s' NOT merged due to collision " + \ - "between a symlink and a directory which is explicitly " + \ - "forbidden by PMS (see bug #326685).") % \ - (self.settings.mycpv,) else: msg =3D _("Package '%s' merged despite file collisions.") % \ self.settings.mycpv