From: Fabian Groffen Date: Mon, 28 Jul 2008 18:38:40 +0000 (-0000) Subject: Avoid portage constantly complaining about IONICENESS not working, since one has... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=df1e932bdff589d27f8f916a4fbe204728824058;p=portage.git Avoid portage constantly complaining about IONICENESS not working, since one has to be root to do that (and in Prefix we usually aren't) svn path=/main/branches/prefix/; revision=11243 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index dfc0ffd00..b4756cf9e 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -13083,6 +13083,10 @@ def ionice(settings): if not ionice_cmd: return + # Don't try if not root, it will be denied http://www.stupids.org/?p=25 + if os.geteuid() != 0: + return + from portage.util import varexpand variables = {"PID" : str(os.getpid())} cmd = [varexpand(x, mydict=variables) for x in ionice_cmd]