Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 37124 | Differences between
and this patch

Collapse All | Expand All

(-)emerge.old (-1 / +17 lines)
Lines 2505-2512 Link Here
2505
			if ips:
2505
			if ips:
2506
				del ips[0]
2506
				del ips[0]
2507
			if ips==[]:
2507
			if ips==[]:
2508
				if portage.settings.has_key("RSYNC_IPV"):
2509
					if portage.settings["RSYNC_IPV"] == "4":
2510
						rsync_afi = socket.AF_INET
2511
					elif portage.settings["RSYNC_IPV"] == "6":
2512
						rsync_afi = socket.AF_INET6
2513
					else:
2514
						print "!!! RSYNC_IPV specified, but it is not 4 or 6."
2515
						rsync_afi = socket.AF_UNSPEC
2516
				else:
2517
					rsync_afi = socket.AF_UNSPEC
2518
					
2508
				try:
2519
				try:
2509
					ips=socket.gethostbyname_ex(hostname)[2]
2520
					for addrinfo in socket.getaddrinfo(hostname, None, rsync_afi, socket.SOCK_STREAM):
2521
						if addrinfo[0] == 10:	# IPv6 addresses need to be added with brackets
2522
							ips.append('[' + addrinfo[4][0] + ']')
2523
						else:
2524
							ips.append(addrinfo[4][0])
2525
							
2510
				except SystemExit, e:
2526
				except SystemExit, e:
2511
					raise # Needed else can't exit
2527
					raise # Needed else can't exit
2512
				except Exception, e:
2528
				except Exception, e:

Return to bug 37124