When copying tree in passthrough mode symlinks to directories does not copied properly. Instead of copying symlink empty directory created with the name of symlink. Reproducible: Always Steps to Reproduce: mkdir test cd test mkdir a ln -s a b find . | cpio -pdlum --quiet ../test2 cd ../test2 ls -F Actual Results: a/ b/ Expected Results: a/ b@ Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0 , 2.6.11-rc2 i686) ================================================================= System uname: 2.6.11-rc2 i686 Celeron (Coppermine) Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Jan 5 2005, 03:35:09)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share /config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/ mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/sh are/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/te x/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" LANG="ru_RU.KOI8-R" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://ftp3.linux.kiev.ua/pub/Linux/Gentoo/portage" USE="x86 X alsa apm artswrappersuid avi berkdb bitmap-fonts cdr cmucl crypt cups directfb doc dvd dvdr esd f77 fam fbcon font-server foomaticdb gdbm gif gphoto2 gpm gtk gtk2 guile imagemagick imlib jpeg leim libg++ libwww mad maildir matrox mikmod mmx motif mozdevelop mozilla moznocompose moznoirc moznomail mpeg mppe-m ppc mysql ncurses network nls nptl oggvorbis opengl pam pcre pda pdflib perl png postgres python qt quicktime readline real samba sdl slang spell sse ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib video_card s_matrox" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
The bug also affects symlinked files.Really annoying, I really wondered why my archives suddenly became so huge ;). see this thread on cpio ml: http://lists.gnu.org/archive/html/bug-cpio/2005-01/msg00003.html As the upstream patch in cpio cvs solves this with changing configure.ac and some m4 macros in the cvs bootstrap script, which would be quite ugly to handle in an ebuild, i created a small, quick patch which makes the needed changes to the existing configure script.at least it works for me. pls verify
Created attachment 50084 [details, diff] 2.6-lstat.patch
The main problem for me is not acting as -L. The behavior that symlinked directory was whole copied was enought for me. But problem that on symlink to directory on input I'm getting empty directory on output (I guess if -L was used directory should be copied in this case). I have found workaround for me, as I do not need 2.6 functionality (I even don't know how 2.6 differs from 2.5, expect the bugs of course ;)) I downgraded to 2.5, good that it still available in portage tree.
ok, maybe "acting like -L" isn't the accurate bug description. But fact is it doesn't properly handle symbolic links to directories or files. Have tried the patch? I tested it with the steps you wrote in your description, and it gives me the expected result.
*** Bug 81367 has been marked as a duplicate of this bug. ***
added to 2.6-r2, thanks for the patch :)