root@gw: /etc/portage master ⚡ # emerge -v --info [2:10:50] !!! Repository 'x-portage' is missing masters attribute in '/usr/portage/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility WARNING: One or more repositories have missing repo_name entries: /usr/portage/profiles/repo_name NOTE: Each repo_name entry should be a plain text file containing a unique name for the repository on the first line. Portage 2.2.8-r2 (unavailable, gcc-4.7.3, glibc-2.19-r1, 3.16.2-hardened x86_64) ================================================================= System uname: Linux-3.16.2-hardened-x86_64-QEMU_Virtual_CPU_version_1.0-with-gentoo-2.2 KiB Mem: 497908 total, 18428 free KiB Swap: 488340 total, 394284 free Timestamp of tree: Unknown ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2 dev-lang/python: 2.7.7::gentoo, 3.3.5-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.13.4::gentoo sys-devel/binutils: 2.23.2::gentoo sys-devel/libtool: 2.4.2-r1::gentoo sys-kernel/linux-headers: 3.13::gentoo (virtual/os-headers) Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 x-portage location: /usr/portage masters: gentoo ACCEPT_LICENSE="*" ACCEPT_PROPERTIES="*" ACCEPT_RESTRICT="*" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe -march=x86-64" CHOST="x86_64-pc-linux-gnu" CLEAN_DELAY="5" COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CURL_SSL="gnutls" CXXFLAGS="-Os -pipe -march=x86-64" DISTDIR="/usr/portage/distfiles" EDITOR="/usr/bin/vi" EMERGE_WARNING_DELAY="10" EPREFIX="" EROOT="/" FCFLAGS="" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}"" FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp -P \${port} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}"" FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}"" FFLAGS="" GCC_SPECS="" GEM_HOME="/usr/local/rvm/gems/ruby-1.9.3-p547" GEM_PATH="/usr/local/rvm/gems/ruby-1.9.3-p547:/usr/local/rvm/gems/ruby-1.9.3-p547@global" GENTOO_MIRRORS="http://distfiles.gentoo.org" GREP_COLOR="1;32" GRUB_PLATFORMS="pc" HOME="/root" INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.23.2/info:/usr/share/info/emacs-24" IRBRC="/usr/local/rvm/rubies/ruby-1.9.3-p547/.irbrc" LC_CTYPE="" LDFLAGS="" LESS="-R" LESSOPEN="|lesspipe %s" LOGNAME="root" LSCOLORS="Gxfxcxdxbxegedabagacad" MAIL="/var/mail/root" MAKEOPTS="-j1" MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.23.2/man" MULTIOSDIRS="../lib64" MY_RUBY_HOME="/usr/local/rvm/rubies/ruby-1.9.3-p547" OLDPWD="/etc" OPENGL_PROFILE="xorg-x11" PAGER="less" PATH="/root/bin:/usr/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p547/bin:/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p547/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3:/usr/local/rvm/bin" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="" PORTAGE_BIN_PATH="/usr/lib64/portage/bin" PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="log warn error" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo" PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5" PORTAGE_FETCH_RESUME_MIN_SIZE="350K" PORTAGE_GID="250" PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}"" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_INTERNAL_CALLER="1" PORTAGE_OVERRIDE_EPREFIX="" PORTAGE_PYM_PATH="/usr/lib64/portage/pym" PORTAGE_PYTHONPATH="/usr/lib64/portage/pym" PORTAGE_REPOSITORIES="[DEFAULT] main-repo = gentoo [gentoo] location = /usr/portage masters = priority = -1000 sync-type = rsync sync-uri = rsync://rsync.gentoo.org/gentoo-portage [x-portage] location = /usr/portage masters = gentoo " PORTAGE_RSYNC_OPTS="--timeout=0 -avvv --recursive --times --exclude=/distfiles --exclude=/local --exclude=/packages --compress --whole-file" PORTAGE_RSYNC_RETRIES="-1" PORTAGE_SYNC_STALE="30" PORTAGE_TMPDIR="/var/tmp" PORTAGE_VERBOSE="1" PORTAGE_WORKDIR_MODE="0700" PORTAGE_XATTR_EXCLUDE="security.* system.nfs4_acl" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage" PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete" PWD="/etc/portage" RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}"" RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}"" ROOT="/" ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3" RPMDIR="/usr/portage/rpm" RUBY_VERSION="ruby-1.9.3-p547" SHELL="/bin/zsh" SHLVL="1" SSH_CLIENT="174.21.54.130 60446 22" SSH_CONNECTION="174.21.54.130 60446 208.79.92.66 22" SSH_TTY="/dev/pts/3" TERM="xterm" UNINSTALL_IGNORE="/lib/modules/*" USE="acl acpi btrfs caps iproute2 iptables ipv6 logrotate lzma lzo mmx nptl offensive smp sqlite sse sse2 threads vim-syntax zlib" USER="root" USERLAND="GNU" USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d" ZSH="/root/.oh-my-zsh" _="/usr/bin/emerge" _system_arch="x86_64" _system_name="Gentoo" _system_type="Linux" _system_version="base-2.2" rvm_alias_expanded="" rvm_bin_path="/usr/local/rvm/bin" rvm_docs_type="" rvm_gemstone_package_file="" rvm_gemstone_url="" rvm_hook="" rvm_niceness="" rvm_nightly_flag="" rvm_path="/usr/local/rvm" rvm_prefix="/usr/local" rvm_proxy="" rvm_quiet_flag="" rvm_ruby_file="" rvm_ruby_make="" rvm_ruby_make_install="" rvm_ruby_mode="" rvm_script_name="" rvm_sdk="" rvm_silent_flag="" rvm_version="1.25.28 (stable)" rvm_wrapper_name="" root@gw: /etc/portage master ⚡ # expected: never times out got: root@gw: /etc/portage master ⚡ # emerge --sync [2:17:59] >>> Synchronization of repository 'gentoo' located in '/usr/portage'... >>> Starting rsync with rsync://[2a01:488:67:1000:b01c:3277:0:1]/gentoo-portage... [client] add_rule(- /distfiles) [client] add_rule(- /local) [client] add_rule(- /packages) opening tcp connection to 2a01:488:67:1000:b01c:3277:0:1 port 873 Connected to 2a01:488:67:1000:b01c:3277:0:1 (2a01:488:67:1000:b01c:3277:0:1) note: iconv_open("ANSI_X3.4-1968", "ANSI_X3.4-1968") succeeded. timed out [Receiver] _exit_cleanup(code=20, file=rsync.c, line=549): entered rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [Receiver=3.0.9] [Receiver] _exit_cleanup(code=20, file=rsync.c, line=549): about to call exit(20) >>> Retrying... proof of concept: # rsync -avvv --timeout=0 --compress 'rsync://[2a01:90:200:10::1a]':/gentoo-portage/ /usr/portage [2:19:19] opening tcp connection to 2a01:90:200:10::1a port 873 Connected to 2a01:90:200:10::1a (2a01:90:200:10::1a) .... starts syncing just fine also : # rsync -avvv --timeout=0 --compress --times --exclude=/distfiles --exclude=/local --exclude=/packages --whole-file 'rsync://[2a01:90:200:10::1a]':/gentoo-portage/ /usr/portage [2:20:53] [client] add_rule(- /distfiles) [client] add_rule(- /local) [client] add_rule(- /packages) opening tcp connection to 2a01:90:200:10::1a port 873 Connected to 2a01:90:200:10::1a (2a01:90:200:10::1a) .... starts syncing just fine emerge --sync never works though.
You need to set PORTAGE_RSYNC_INITIAL_TIMEOUT="0" in make.conf. See the make.conf man page. This timeout is implemented by portage, since otherwise it's possible for the initial connection attempt to hang indefinitely.
I'm having a hard time reproducing this one. `PORTAGE_RSYNC_INITIAL_TIMEOUT` is not set in my make.conf but I am not seeing any retries. > d90b8e45db74 ~/portage # PORTAGE_RSYNC_OPTS="--timeout=0 -avvv --recursive --times --exclude=/distfiles --exclude=/local --exclude=/packages --compress --whole-file" ./bin/emerge --sync | grep -i -A 10 -B 10 'retry'