I have a local rsync and I've set SYNC="rsync://gmsoft/gentoo-portage/ " The trailing space cause emerge sync to use /bin as PORTDIR instead of the right location. Btw emerge info still display the correct information. rsync is invocked with the --delete arg which destroy every files in the destdir which are not in the portage tree. Reproducible: Always Steps to Reproduce: 1. set SYNC="rsync://some.rsync.srv/gentoo-portage/with/a/trailing/space/ " 2. emerge sync 3. ls /bin Actual Results: rm /bin/* Expected Results: A nice clean emerge sync as usual :) gmsoft root # emerge info Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20 i686 AMD Athlon(tm) processor GENTOO_MIRRORS=" ftp://ftp.easynet.nl/mirror/gentoo/" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/storage/public" PORTDIR_OVERLAY="/usr/local/portage/overlay-cross" USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts svga java guile X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt kde motif opengl cdr aalib acpi directfb dvd ethereal fbcon gd -gnome gtk2 ipv6 mozilla samba tcltk tetex tiff usb xinerama" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer -ffast-math -funroll-loops -fforce-addr -falign-functions=4" CXXFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer -ffast-math -funroll-loops -fforce-addr -falign-functions=4" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="yes" SYNC="rsync://gmsoft/gentoo-portage/ " FEATURES="sandbox ccache distcc prelink"
Quick fix: Line 1574 of /usr/bin/emerge needs to be changed from: syncuri=portage.settings["SYNC"] to: syncuri=string.rstrip(portage.settings["SYNC"])
Ouch... That's a rough thing to notice the hard way... Almost as bad as running the old helper scripts as root, outside of portage.
Fixed in cvs