The ebuild fails in the patch step, and produces the following error message in it's output file: ***** commons-discovery-0.2-gentoo.diff ***** ============================================= PATCH COMMAND: patch -p0 -g0 < /usr/portage/dev-java/commons-discovery/files/commons-discovery-0.2-gentoo.diff ============================================= patching file build.xml ============================================= ACTUALLY APPLYING commons-discovery-0.2-gentoo.diff ... ============================================= patching file build.xml patch: **** Can't rename file /var/tmp/portage/commons-discovery-0.2-r2/temp/posdHVM5 to build.xml : Permission denied Reproducible: Always Steps to Reproduce: 1. Just type "emerge commons-discovery" Actual Results: The following output was produced (after merging dependencies) Calculating dependencies ...done! >>> emerge (1 of 1) dev-java/commons-discovery-0.2-r2 to / >>> md5 src_uri ;-) commons-discovery-0.2-src.tar.gz >>> Unpacking source... >>> Unpacking commons-discovery-0.2-src.tar.gz to /var/tmp/portage/commons-discovery-0.2-r2/work * Applying commons-discovery-0.2-gentoo.diff ... * A dry-run of patch command succeeded, but actually * applying the patch failed! * Failed Patch: commons-discovery-0.2-gentoo.diff! * * Include in your bugreport the contents of: * * /var/tmp/portage/commons-discovery-0.2-r2/temp/commons-discovery-0.2-gentoo.diff-20823.out Expected Results: Install cleanly? ;) I am using sun-jdk 1.5.0.01, but the error seems unrelated to the JDK used, since it is a permission problem. Strangly enough, when i ls -hal the source directory while the build is active, user portage owns everything. Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10 i686) ================================================================= System uname: 2.6.10 i686 AMD Athlon(tm) MP 2000+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 20:29:12)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.4.21-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-mp -m3dnow -msse -mmmx -fomit-frame-pointer -Os -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-mp -m3dnow -msse -mmmx -fomit-frame-pointer -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 3dnow X alsa avi berkdb bitmap-fonts crypt encode esd f77 fam font-server fortran gdbm gif gnome gstreamer gtk gtk2 imlib imlib2 ipv6 java jpeg junit latex libg++ libwww mad mikmod mmx motif mozilla mpeg mplayer ncurses network nls no-old-linux noreiserfs offensive oggvorbis opengl oss pam pdflib perl png posix python quicktime radeon readline rtc sdl shared sharedmem sockets spell ssl tcpd tetex tiff truetype truetype-fonts type1-fonts xml xml2 xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Can be worked around by inserting a "sleep" into the ebuild, and doing a 'chmod -R 777' to the work directory. Not what i would call a solution, though.
works fine for me can you try compiling sys-devel/patch with clean cflags and try again?
Re-merging patch with "-O0 -march=i386" did not solve the problem, however since this seems to be a permissions problem, there might some very subtile problem with the C library... but i don't want to replace that.
seems to be related to your specific system, maybe you played around with the permissions or something.
Does not not work at all. Same problem as the initial bug-report. The commons-discovery-0.2-gentoo.diff uses M$ Win linebreaks. So there is indeed something really wrong ;). After fixing this the patch failed due to insufficient permissions. Seems like portage may not write to the working-directory. The quick and dirty workaround is to set the permissions by chmod. Patches will be there in a minute... Please reopen this bug!
Created attachment 56511 [details] commons-discovery-0.2-gentoo.diff Corrected version of the gentoo-diff
Created attachment 56512 [details, diff] commons-discovery-0.2-r2.ebuild.patch Patch for the commons-discovery.ebuild. Makes the workdir writable so the gentoo.diff can be applied
reopening...
the patch has CRLF line breaks because the build.xml in the tar has them too Dunno about the persmission don't see why that would happend userpriv drops to portage user, and its all read/writable by portage
commited a new version of the patch, thanks.
Thanks for the fast response.