diff options
author | Alec Warner <antarus@gentoo.org> | 2007-01-18 06:34:52 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-01-18 06:34:52 +0000 |
commit | e3daff129e4d688856b1a764a1ee25dd1326d974 (patch) | |
tree | 55f9d7560de2393d0bf904761c71b83e9409d5fc | |
parent | 3aaee9a7c7ada5d332193213eb88d7b010b76ebd (diff) | |
download | portage-e3daff129e4d688856b1a764a1ee25dd1326d974.tar.gz portage-e3daff129e4d688856b1a764a1ee25dd1326d974.tar.bz2 portage-e3daff129e4d688856b1a764a1ee25dd1326d974.zip |
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
-rwxr-xr-x | bin/emerge | 2 | ||||
-rw-r--r-- | pym/portage_news.py | 8 |
2 files changed, 6 insertions, 4 deletions
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. |