When invoked with --fetchonly, emerge seems to forget that --pretends means no writing should occur (as its own info line “packages that would be fetched” implies). Using either, alone, works fine (-f does really only fetch the file, and -p does really not write a thing). I also noticed, while filing this bug, that even without --pretend, emerge -vf still prints “would be fetched”, yet it then proceeds downloading (fetching) them for real, as it should. Looks like the --pretend code path is a bit twisted (inverted) in the --fetchonly case. Reproducible: Always Steps to Reproduce: 1. emerge -vpf nano Actual Results: These are the packages that would be fetched, in order: Calculating dependencies... done! /var/tmp/portage is not writable. Likely cause is that you've mounted it as readonly. * Fetch failed for 'app-editors/nano-2.1.9' >>> Failed to emerge app-editors/nano-2.1.9 Expected Results: Calculating dependencies... done! >>> Fetching (1 of 1) app-editors/nano-2.1.9 >>> Downloading ... (fetching messages follow) emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r6 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T5550_@_1.83GHz-with-gentoo-2.0.1 Timestamp of tree: Sun, 20 Sep 2009 07:45:01 +0000 app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.6.2-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=core2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O3 -march=core2 -pipe" DISTDIR="/store/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.unina.it/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="it" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X aalib acl acpi alsa bash-completion branding bzip2 cairo cdda cddb cdr cli cracklib crypt cxx dbus dga dri dvd dvdr encode exif fbcon ffmpeg flac fontconfig ftp fuse gd gif gimp gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk hal hddtemp iconv id3tag ieee1394 isdnlog java javascript jpeg jpeg2k lame lcms libnotify lm_sensors lzma matroska midi mime mmap mmx mng mp3 mp4 mpeg mudflap nautilus ncurses nfs nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pch pcmcia pcre pdf perl png posix pppd python readline reflection samba sdl session sharedmem smp sockets spell spl sqlite sse sse2 sse3 ssl svg sysfs syslog sysvipc tcpd threads tiff truetype unicode usb v4l v4l2 vorbis wifi x86 xattr xorg xpm xulrunner xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES=" actions alias asis auth_basic authz_host autoindex dir env headers ident include log_config mime mime_magic negotiation rewrite version " APACHE2_MPMS="worker" CAMERAS="template" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Just to clarify, /var/tmp/portage is really not writable, ’cause I only sudo emerge when not using --pretend (call it “added insurance” :) .
(In reply to comment #0) > Expected Results: > Calculating dependencies... done! > > >>> Fetching (1 of 1) app-editors/nano-2.1.9 > >>> Downloading ... > (fetching messages follow) This is obviously wrong (I had to make it up, my bad). Expected results are really just printing the name of the files to be downloaded, with no fetching messages (and no actual fetching either).
this can happen iff the user doing the emerge is not root or not part of the 'portage' group.
We need a temp dir in order to satisfy bug 241118. However, since we're in pretend mode, we should use /tmp instead of PORTAGE_TMPDIR.
(In reply to comment #4) > We need a temp dir in order to satisfy bug 241118. And also bug 239560.
(In reply to comment #4) > We need a temp dir in order to satisfy bug 241118. However, since we're in > pretend mode, we should use /tmp instead of PORTAGE_TMPDIR. > can we expect /tmp to exist in prefix portage?
(In reply to comment #6) > (In reply to comment #4) > > We need a temp dir in order to satisfy bug 241118. However, since we're in > > pretend mode, we should use /tmp instead of PORTAGE_TMPDIR. > > > > can we expect /tmp to exist in prefix portage? Well, when I said /tmp I really meant whatever directory python tempfile module uses by default, which should be fine.
This should be fixed now that mkdtemp is used since this commit: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2f3e904a0044c9dbaa644cd387339d8db632ae00
This still happens in sys-apps/portage-2.2.0_alpha64: $ emerge -pqf virtual/linux-sources /var/tmp/portage is not writable. Likely cause is that you've mounted it as readonly. >>> Failed to emerge virtual/linux-sources-0
(In reply to comment #9) > This still happens in sys-apps/portage-2.2.0_alpha64: > > $ emerge -pqf virtual/linux-sources > /var/tmp/portage is not writable. > Likely cause is that you've mounted it as readonly. > >>> Failed to emerge virtual/linux-sources-0 This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7b2be36898ef04a8cef42dc41cbc162004f329c2
This is fixed in 2.1.10.25 and 2.2.0_alpha65.