After any merge action as a normal user, portage throws the following exception: Traceback (most recent call last): File "/usr/bin/emerge", line 40, in <module> retval = _emerge.emerge_main() File "//usr/lib64/portage/pym/_emerge/__init__.py", line 14692, in emerge_main post_emerge(root_config, myopts, mtimedb, retval) File "//usr/lib64/portage/pym/_emerge/__init__.py", line 11740, in post_emerge display_news_notification(root_config, myopts) File "//usr/lib64/portage/pym/_emerge/__init__.py", line 11658, in display_news_notification portdb, vardb, NEWS_PATH, UNREAD_PATH, repo, update=update) File "//usr/lib64/portage/pym/_emerge/__init__.py", line 11844, in checkUpdatedNewsItems return manager.getUnreadItems( repo_id, update=update ) File "//usr/lib64/portage/pym/portage/news.py", line 158, in getUnreadItems unread_lock = lockfile(unread_filename, wantnewlockfile=1) File "//usr/lib64/portage/pym/portage/locks.py", line 60, in lockfile myfd = os.open(lockfilename, os.O_CREAT|os.O_RDWR,0660) OSError: [Errno 13] Permission denied: '/var/lib/gentoo/news/.news-gentoo.unread.portage_lockfile' Reproducible: Always Steps to Reproduce: 1. emerge -p any-package File is apparently cleaned up at some point, does not exist after emerge exits. Output of 'emerge --info' Portage 2.1.6.6 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3 x86_64) ================================================================= System uname: Linux-2.6.26-gentoo-r3-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5 Timestamp of tree: Thu, 15 Jan 2009 21:15:03 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-util/cmake: 2.4.6-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="candy distlocks fixpackages gpg parallel-fetch protect-owned sandbox severe sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ " LANG="C" LDFLAGS="-Wl,-O1" LINGUAS="en_US" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" 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" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X aac acl alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt cups curl dbus dri emacs ffmpeg flac fortran gdbm gif gnome gnutls gpg gpm gtk hal iconv isdnlog jac java jpeg jpeg2k libnotify libsamplerate lzo mad mbox midi mmx modplug mudflap multilib musepack ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre perl png pppd python qt readline reflection samba session sid sndfile speex spell spl sse sse2 ssl startup-notification subversion sysfs tcpd threads tiff timidity truetype unicode vim-syntax vorbis wavpack xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="ati nvidia radeon vesa vga" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
*** This bug has been marked as a duplicate of bug 237526 ***
Not a duplicate.
Created attachment 178669 [details, diff] handle permission denied error If this patch is saved as /tmp/perm_denied.patch, then it can be applied as follows: cd /usr/lib/portage patch -p0 < /tmp/perm_denied.patch
(In reply to comment #3) That patch did the trick, thanks.
Thanks for testing. Reopening until it's released.
This is fixed in 2.1.6.7 and 2.2_rc23.
*** Bug 262281 has been marked as a duplicate of this bug. ***