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

(-)portage-2.1.1_pre20060710/bin/emerge (-1 / +14 lines)
Lines 2657-2664 Link Here
2657
			if ips:
2657
			if ips:
2658
				del ips[0]
2658
				del ips[0]
2659
			if ips==[]:
2659
			if ips==[]:
2660
				rsync_afi = socket.AF_UNSPEC
2661
				for opt in ("-4", "--ipv4"):
2662
					if opt in rsync_opts:
2663
						rsync_afi = socket.AF_INET
2664
				for opt in ("-6", "--ipv6"):
2665
					if opt in rsync_opts:
2666
						rsync_afi = socket.AF_INET6
2667
2660
				try:
2668
				try:
2661
					ips=socket.gethostbyname_ex(hostname)[2]
2669
					for addrinfo in socket.getaddrinfo(hostname, None, rsync_afi, socket.SOCK_STREAM):
2670
						if addrinfo[0] == 10:	# IPv6 addresses need to be added with brackets
2671
							ips.append('[' + addrinfo[4][0] + ']')
2672
						else:
2673
							ips.append(addrinfo[4][0])
2674
							
2662
				except SystemExit, e:
2675
				except SystemExit, e:
2663
					raise # Needed else can't exit
2676
					raise # Needed else can't exit
2664
				except Exception, e:
2677
				except Exception, e:

Return to bug 37124