From df1e932bdff589d27f8f916a4fbe204728824058 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 28 Jul 2008 18:38:40 +0000 Subject: [PATCH] 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 --- pym/_emerge/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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] -- 2.26.2