diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-02-13 15:38:41 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-02-13 15:38:41 -0800 |
commit | 6d2a73d7f78dac986539c0c6b841cc499c2088e6 (patch) | |
tree | 3d475d5f4ce42aae341696d49844295f590cbe0b /pym/portage/package/ebuild/config.py | |
parent | 36883148297f4ff96c404ab23d75739dd21de31c (diff) | |
download | portage-6d2a73d7f78dac986539c0c6b841cc499c2088e6.tar.gz portage-6d2a73d7f78dac986539c0c6b841cc499c2088e6.tar.bz2 portage-6d2a73d7f78dac986539c0c6b841cc499c2088e6.zip |
Handle missing os.setgroups for PyPy.
See https://bugs.pypy.org/issue833 for details.
Diffstat (limited to 'pym/portage/package/ebuild/config.py')
-rw-r--r-- | pym/portage/package/ebuild/config.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 366f548f1..4304e09c7 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -938,6 +938,23 @@ class config(object): writemsg(_("!!! FEATURES=fakeroot is enabled, but the " "fakeroot binary is not installed.\n"), noiselevel=-1) + if os.getuid() == 0 and not hasattr(os, "setgroups"): + warning_shown = False + + if "userpriv" in self.features: + writemsg(_("!!! FEATURES=userpriv is enabled, but " + "os.setgroups is not available.\n"), noiselevel=-1) + warning_shown = True + + if "userfetch" in self.features: + writemsg(_("!!! FEATURES=userfetch is enabled, but " + "os.setgroups is not available.\n"), noiselevel=-1) + warning_shown = True + + if warning_shown and platform.python_implementation() == 'PyPy': + writemsg(_("!!! See https://bugs.pypy.org/issue833 for details.\n"), + noiselevel=-1) + def load_best_module(self,property_string): best_mod = best_from_dict(property_string,self.modules,self.module_priority) mod = None |