Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11243 - main/branches/prefix/pym/_emerge
Date: Mon, 28 Jul 2008 18:38:45
Message-Id: E1KNXcH-0004KX-PA@stork.gentoo.org
1 Author: grobian
2 Date: 2008-07-28 18:38:40 +0000 (Mon, 28 Jul 2008)
3 New Revision: 11243
4
5 Modified:
6 main/branches/prefix/pym/_emerge/__init__.py
7 Log:
8 Avoid portage constantly complaining about IONICENESS not working, since one has to be root to do that (and in Prefix we usually aren't)
9
10 Modified: main/branches/prefix/pym/_emerge/__init__.py
11 ===================================================================
12 --- main/branches/prefix/pym/_emerge/__init__.py 2008-07-28 18:23:29 UTC (rev 11242)
13 +++ main/branches/prefix/pym/_emerge/__init__.py 2008-07-28 18:38:40 UTC (rev 11243)
14 @@ -13083,6 +13083,10 @@
15 if not ionice_cmd:
16 return
17
18 + # Don't try if not root, it will be denied http://www.stupids.org/?p=25
19 + if os.geteuid() != 0:
20 + return
21 +
22 from portage.util import varexpand
23 variables = {"PID" : str(os.getpid())}
24 cmd = [varexpand(x, mydict=variables) for x in ionice_cmd]