From 2f7b3a2547cc25c23cc035ca85e2dbfbea3b0765 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 13 Nov 2008 03:40:48 +0000 Subject: [PATCH] Use apply_secpass_permissions() to avoid OperationNotPermitted errors when not allowed to chown files to root uid. svn path=/main/trunk/; revision=11873 --- pym/portage/news.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/portage/news.py b/pym/portage/news.py index d26a3ab8d..aa979dabd 100644 --- a/pym/portage/news.py +++ b/pym/portage/news.py @@ -10,7 +10,7 @@ __all__ = ["NewsManager", "NewsItem", "DisplayRestriction", import logging import os import re -from portage.util import apply_permissions, ensure_dirs, \ +from portage.util import apply_secpass_permissions, ensure_dirs, \ grabfile, normalize_path, write_atomic, writemsg_level from portage.data import portage_gid from portage.dep import isvalidatom @@ -124,14 +124,14 @@ class NewsManager(object): if unread != unread_orig: write_atomic(unread_filename, "".join("%s\n" % x for x in sorted(unread))) - apply_permissions(unread_filename, + apply_secpass_permissions(unread_filename, uid=self._uid, gid=self._gid, mode=self._file_mode, mask=self._mode_mask) if skip != skip_orig: write_atomic(skip_filename, "".join("%s\n" % x for x in sorted(skip))) - apply_permissions(skip_filename, + apply_secpass_permissions(skip_filename, uid=self._uid, gid=self._gid, mode=self._file_mode, mask=self._mode_mask) -- 2.26.2