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 1PsrCA-0007j3-2C for garchives@archives.gentoo.org; Fri, 25 Feb 2011 06:30:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CC1BE0521; Fri, 25 Feb 2011 06:30:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 39907E0521 for ; Fri, 25 Feb 2011 06:30:21 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDD411B41F6 for ; Fri, 25 Feb 2011 06:30:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 12CD58006A for ; Fri, 25 Feb 2011 06:30:20 +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: <4609f5da90f3d925255d68c2cacc1bda6814dfcf.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 4609f5da90f3d925255d68c2cacc1bda6814dfcf Date: Fri, 25 Feb 2011 06:30:20 +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: 81d9194cb8e950e24c495afe2022dcef commit: 4609f5da90f3d925255d68c2cacc1bda6814dfcf Author: Zac Medico gentoo org> AuthorDate: Fri Feb 25 06:29:31 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Feb 25 06:29:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D4609f5da action_sync: handle IPv6 [ip] in SYNC some more This will fix bug #356375 some more. --- pym/_emerge/actions.py | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 1b3b181..20220fc 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2088,13 +2088,23 @@ def action_sync(settings, trees, mtimedb, myopts,= myaction): maxretries =3D -1 #default number of retries =20 retries=3D0 - proto, user_name, hostname, port =3D re.split( - r"(rsync|ssh)://([^:/]+@)?(\[[:\da-fA-F]*\]|[^:/]*)(:[0-9]+)?", - syncuri, maxsplit=3D4)[1:5] + try: + proto, user_name, hostname, port =3D re.split( + r"(rsync|ssh)://([^:/]+@)?(\[[:\da-fA-F]*\]|[^:/]*)(:[0-9]+)?", + syncuri, maxsplit=3D4)[1:5] + except ValueError: + writemsg_level("!!! SYNC is invalid: %s\n" % syncuri, + noiselevel=3D-1, level=3Dlogging.ERROR) + return 1 if port is None: port=3D"" if user_name is None: user_name=3D"" + if re.match(r"^\[[:\da-fA-F]*\]$", hostname) is None: + getaddrinfo_host =3D hostname + else: + # getaddrinfo needs the brackets stripped + getaddrinfo_host =3D hostname[1:-1] updatecache_flg=3DTrue all_rsync_opts =3D set(rsync_opts) extra_rsync_opts =3D portage.util.shlex_split( @@ -2113,7 +2123,7 @@ def action_sync(settings, trees, mtimedb, myopts, m= yaction): =20 try: addrinfos =3D getaddrinfo_validate( - socket.getaddrinfo(hostname, None, + socket.getaddrinfo(getaddrinfo_host, None, family, socket.SOCK_STREAM)) except socket.error as e: writemsg_level(