Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: yumpackger: do not attempt to use yum if running as 
non root
......................................................................

packaging: yumpackger: do not attempt to use yum if running as non root

Change-Id: Id0ebb08313795c2135f5b75f9024f1f2a60cbd91
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M src/plugins/otopi/packagers/yumpackager.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/57/13257/1

diff --git a/src/plugins/otopi/packagers/yumpackager.py 
b/src/plugins/otopi/packagers/yumpackager.py
index eb55296..07ad977 100644
--- a/src/plugins/otopi/packagers/yumpackager.py
+++ b/src/plugins/otopi/packagers/yumpackager.py
@@ -21,6 +21,7 @@
 """yum packager provider."""
 
 
+import os
 import gettext
 _ = lambda m: gettext.dgettext(message=m, domain='otopi')
 
@@ -81,8 +82,9 @@
 
             # the following will trigger the NOTIFY_REEXEC
             # and then reexecute
-            self._miniyum.selinux_role()
-            self._enabled = True
+            if os.geteuid() == 0:
+                self._miniyum.selinux_role()
+                self._enabled = True
         except ImportError:
             self.logger.debug('Cannot import miniyumlocal', exc_info=True)
 


--
To view, visit http://gerrit.ovirt.org/13257
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0ebb08313795c2135f5b75f9024f1f2a60cbd91
Gerrit-PatchSet: 1
Gerrit-Project: otopi
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to