From: Alec Warner Date: Thu, 18 Jan 2007 06:34:52 +0000 (-0000) Subject: fix apply_permissions import and use keyworded args in the call, as well as PORTAGE_I... X-Git-Tag: v2.1.2-r3~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3daff129e4d688856b1a764a1ee25dd1326d974;p=portage.git 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 --- diff --git a/bin/emerge b/bin/emerge index bf29453a0..330e8bc6f 100755 --- a/bin/emerge +++ b/bin/emerge @@ -200,7 +200,7 @@ options=[ "--searchdesc", "--selective", "--skipfirst", "--tree", -"--update", +"--update", "--usepkg", "--usepkgonly", "--verbose", "--version" ] 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.