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 1QkhTa-0003v9-6O for garchives@archives.gentoo.org; Sat, 23 Jul 2011 19:03:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C045221C331 for ; Sat, 23 Jul 2011 19:03:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C1C1121C1D8 for ; Sat, 23 Jul 2011 18:47:02 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3BA491B4025 for ; Sat, 23 Jul 2011 18:47:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 454158003D for ; Sat, 23 Jul 2011 18:47:01 +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: <87df7332c631b96a2d238abd2526eb5bb1a6e4f6.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: 87df7332c631b96a2d238abd2526eb5bb1a6e4f6 Date: Sat, 23 Jul 2011 18:47:01 +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: X-Archives-Hash: 435d441987648b433c6e68e220e0b79a commit: 87df7332c631b96a2d238abd2526eb5bb1a6e4f6 Author: Zac Medico gentoo org> AuthorDate: Sat Jul 23 18:46:41 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Jul 23 18:46:41 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D87df7332 merge: handle symlink replacing dir Previously, these symlinks would trigger a file collision message and would then be silently dropped in cases when the file collsion did not cause emerge to bail out due to FEATURES=3Dprotect-owned or collision-protect. Now, if emerge doesn't bail out due to a file collision, it will trigger an eerror message and merge the symlink with a .backup.XXXX extension appended to the file name, similar to handling of regular files in commit 740f71301ed3daf44c0e77df5d5de39fe1438fb1. This will fix bug 326685. --- pym/portage/dbapi/vartree.py | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index d61f739..c703415 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3824,12 +3824,20 @@ class dblink(object): myrealto =3D normalize_path(os.path.join(destroot, myabsto)) if mydmode!=3DNone: #destination exists - if not stat.S_ISLNK(mydmode): - if stat.S_ISDIR(mydmode): - # directory in the way: we can't merge a symlink over a directory - # we won't merge this, continue with next file... - continue + if stat.S_ISDIR(mydmode): + # we can't merge a symlink over a directory + newdest =3D self._new_backup_path(mydest) + msg =3D [] + msg.append("") + msg.append(_("Installation of a symlink is blocked by a directory:= ")) + msg.append(" '%s'" % mydest) + msg.append(_("This symlink will be merged with a different name:")= ) + msg.append(" '%s'" % newdest) + msg.append("") + self._eerror("preinst", msg) + mydest =3D newdest =20 + elif not stat.S_ISLNK(mydmode): if os.path.exists(mysrc) and stat.S_ISDIR(os.stat(mysrc)[stat.ST_M= ODE]): # Kill file blocking installation of symlink to dir #71787 pass