summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-10-02 03:52:41 +0000
committerBrian Harring <ferringb@gentoo.org>2005-10-02 03:52:41 +0000
commit5a885ab7bd42e08c43294c94b6a6b5308476f8c1 (patch)
tree0f1ead54b28829914e617698b0e68df3e9b07b31
parentRemove the specific dependency on python-2.2. (diff)
downloadportage-5a885ab7bd42e08c43294c94b6a6b5308476f8c1.tar.gz
portage-5a885ab7bd42e08c43294c94b6a6b5308476f8c1.tar.bz2
portage-5a885ab7bd42e08c43294c94b6a6b5308476f8c1.zip
saner handling of selinux_enabled
svn path=/main/branches/2.0/; revision=2070
-rw-r--r--ChangeLog4
-rw-r--r--pym/portage.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index afc6080db..490e15340 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
2. /var/cache/edb/world is now /var/lib/portage/world.
3. /etc/portage/profile/virtuals is _USER_ configs only.
+ 01 Oct 2005; Brian Harring <ferringb@gentoo.org> pym/portage.py:
+ selinux_enabled tweak, instead of relying on exception thrown on import,
+ check the actual enabled value (forward compatibility).
+
01 Oct 2005; Brian Harring <ferringb@gentoo.org> bin/repoman:
Touch ups to file.name check.
diff --git a/pym/portage.py b/pym/portage.py
index fbb7711b6..2137a7b87 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7253,7 +7253,10 @@ settings.lock()
if 'selinux' in settings["USE"].split(" "):
try:
import selinux
- selinux_enabled=1
+ if hasattr(selinux, "enabled"):
+ selinux_enabled = selinux.enabled
+ else:
+ selinux_enabled = 1
except OSError, e:
writemsg(red("!!! SELinux not loaded: ")+str(e)+"\n")
selinux_enabled=0