summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/news.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py
index 6f2eac2b2..b9326c94d 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -100,8 +100,17 @@ class NewsManager(object):
finally:
unlockfile(unread_lock)
write_atomic(skipfile, "\n".join(skiplist)+"\n")
- apply_permissions(filename=skipfile,
+ try:
+ apply_permissions(filename=skipfile,
uid=int(self.config["PORTAGE_INST_UID"]), gid=portage_gid, mode=0664)
+ except OSError, e:
+ import errno
+ # skip "permission denied" errors as we're likely running in pretend mode
+ # with reduced priviledges
+ if e.errno == errno.EPERM:
+ pass
+ else:
+ raise
def getUnreadItems(self, repoid, update=False):
"""