diff -urNp pkgcore-0.4.3-orig/pkgcore/ebuild/portage_conf.py pkgcore-0.4.3/pkgcore/ebuild/portage_conf.py
|
old
|
new
|
|
| 125 | 125 | if timeout is not None: |
| 126 | 126 | base['timeout'] = timeout.strip() |
| 127 | 127 | |
| | 128 | proxy = options.pop('RSYNC_PROXY', None) |
| | 129 | if proxy is not None: |
| | 130 | base['proxy'] = proxy.strip() |
| | 131 | |
| 128 | 132 | excludes = options.pop('RSYNC_EXCLUDEFROM', None) |
| 129 | 133 | if excludes is not None: |
| 130 | 134 | extra_opts.extend('--exclude-from=%s' % x |
diff -urNp pkgcore-0.4.3-orig/pkgcore/sync/rsync.py pkgcore-0.4.3/pkgcore/sync/rsync.py
|
old
|
new
|
|
| 45 | 45 | |
| 46 | 46 | pkgcore_config_type = ConfigHint({'basedir':'str', 'uri':'str', |
| 47 | 47 | 'timeout':'str', 'compress':'bool', 'excludes':'list', |
| 48 | | 'includes':'list', 'retries':'str', 'extra_opts':'list'}, |
| | 48 | 'includes':'list', 'retries':'str', 'extra_opts':'list', |
| | 49 | 'proxy':'str'}, |
| 49 | 50 | typename='syncer') |
| 50 | 51 | |
| 51 | 52 | def __init__(self, basedir, uri, timeout=default_timeout, |
| 52 | 53 | compress=False, excludes=(), includes=(), |
| 53 | | retries=default_retries, |
| | 54 | retries=default_retries, proxy=None, |
| 54 | 55 | extra_opts=[]): |
| 55 | 56 | |
| 56 | 57 | uri = uri.rstrip(os.path.sep) + os.path.sep |
| … |
… |
|
| 67 | 68 | self.excludes = list(self.default_excludes) + list(excludes) |
| 68 | 69 | self.includes = list(self.default_includes) + list(includes) |
| 69 | 70 | self.retries = int(retries) |
| | 71 | self.use_proxy = proxy is not None |
| | 72 | if self.use_proxy: |
| | 73 | self.sets_env = True |
| | 74 | self.env = {'RSYNC_PROXY':proxy} |
| 70 | 75 | self.is_ipv6 = "--ipv6" in self.opts or "-6" in self.opts |
| 71 | 76 | self.is_ipv6 = self.is_ipv6 and socket.has_ipv6 |
| 72 | 77 | |
| … |
… |
|
| 75 | 80 | return uri[len("rsync://"):].split("@", 1)[-1].split("/", 1)[0] |
| 76 | 81 | |
| 77 | 82 | def _get_ips(self): |
| | 83 | if self.use_proxy: |
| | 84 | # If we're using a proxy, name resolution is best left to the proxy |
| | 85 | yield self.hostname |
| | 86 | return |
| | 87 | |
| 78 | 88 | af_fam = socket.AF_INET |
| 79 | 89 | if self.is_ipv6: |
| 80 | 90 | af_fam = socket.AF_INET6 |