When compiling app-text/ghostview-1.5-r1 I get: # emerge -1 ghostview Calculating dependencies ...done! >>> emerge (1 of 1) app-text/ghostview-1.5-r1 to / >>> checksums files ;-) ghostview-1.5-r1.ebuild >>> checksums files ;-) files/digest-ghostview-1.5-r1 >>> checksums files ;-) files/ghostview-1.5-r1-gentoo.diff >>> checksums src_uri ;-) ghostview-1.5.tar.gz >>> Unpacking source... >>> Unpacking ghostview-1.5.tar.gz to /var/tmp/portage/ghostview-1.5-r1/work * Applying ghostview-1.5-r1-gentoo.diff ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/ghostview-1.5-r1/work/ghostview-1.5 ... mv -f Makefile Makefile.bak imake -DUseInstalled -I/usr/lib64/X11/config make Makefiles make: Nothing to be done for `Makefiles'. make includes make: Nothing to be done for `includes'. make depend sh ad2c Ghostview.ad > app-defaults.h gccmakedep -- -I/usr/X11R6/include -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -DNON_BLOCKING_IO -DSELFILE -- main.c misc.c callbacks.c actions.c dialogs.c Ghostview.c ps.c getenv.c setenv.c strcasecmp.c SelFile.c Dir.c Path.c Draw.c rm: cannot remove `mdep3592.tmp': No such file or directory rm: remove write-protected regular file `Makefile.bak'? The emerge continues if I say yes (or no, after another question), but still, this should be non-interactive. # emerge --info Portage 2.1_pre3-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.6-r2, 2.6.14-gentoo-r6-20060101 x86_64) ================================================================= System uname: 2.6.14-gentoo-r6-20060101 x86_64 AMD Athlon(tm) 64 Processor 3700+ Gentoo Base System version 1.12.0_pre15 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=k8 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/local /usr/local/portage/modularx" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="amd64 X alsa audiofile avi bitmap-fonts bzip2 cdinstall cdr cjk crypt cups curl emboss encode ethereal expat fam ffmpeg flac foomaticdb fortran gif glut gpm gstreamer gtk gtk2 guile imlib ipv6 java jpeg junit lcms libwww lua lzw lzw-tiff mad mng mp3 mpeg ncurses nls nptl nptlonly ogg openal opengl pam pcre pdflib perl png python quicktime readline sdl speex spell ssl tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vorbis xine xml2 xpm xv zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS
gccmakedep is what's causing this; changing /usr/bin/gccmakedep line 13 from RM=rm to RM="rm -f" makes ghostview install without a problem. This will probably be a problem for anything that uses it (as non-root), so could it please be patched like that?
Alternatively, gccmakedep could be made to abort with read-only files, which would also be sane. (If you want this, I'll modify the ghostview ebuild to handle it.) Either way, asking probably isn't the right thing to do.
No, gccmakedep used to use 'rm -f' in monolithic X, so I've fixed it upstream and will soon import the fix.
Fixed in gccmakedep-1.0.1-r1.