From e3daff129e4d688856b1a764a1ee25dd1326d974 Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Thu, 18 Jan 2007 06:34:52 +0000 Subject: fix apply_permissions import and use keyworded args in the call, as well as PORTAGE_INST_UID instead of root, also fix some spacies in emerge, thanks for Zac for reporting svn path=/main/trunk/; revision=5699 --- pym/portage_news.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pym/portage_news.py') diff --git a/pym/portage_news.py b/pym/portage_news.py index c06a726a0..a0cb885ae 100644 --- a/pym/portage_news.py +++ b/pym/portage_news.py @@ -5,7 +5,7 @@ from portage_const import INCREMENTALS, PROFILE_PATH, NEWS_LIB_PATH from portage import config, vartree, vardbapi, portdbapi -from portage_util import ensure_dirs +from portage_util import ensure_dirs, apply_permissions from portage_data import portage_gid from portage_locks import lockfile, unlockfile, lockdir, unlockdir @@ -89,7 +89,8 @@ class NewsManager(object): unread_lock = lockfile( path ) # Make sure we have the correct permissions when created unread_file = open( path, "a" ) - apply_permissions( unreadfile, 0, portage_gid, 664 ) + apply_permissions( filename=unreadfile, + uid=self.config["PORTAGE_INST_UID"], gid=portage_gid, mode=664 ) for item in updates: unread_file.write( item.path + "\n" ) @@ -113,7 +114,8 @@ class NewsManager(object): unreadfile = os.path.join( self.UNREAD_PATH, "news-"+ repoid +".unread" ) # Set correct permissions on the news-repoid.unread file try: - apply_permissions( unreadfile, 0, portage_gid, 664 ) + apply_permissions( filename=unreadfile, + uid=self.config["PORTAGE_INST_UID"], gid=portage_gid, mode=664 ) except FileNotFound: pass # It may not exist yet, thats ok. -- cgit v1.2.3-1-g7c22