summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/helper.py')
-rw-r--r--portato/helper.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/portato/helper.py b/portato/helper.py
index 1ae6264..d3fc70b 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -13,7 +13,7 @@
"""
Some nice functions used in the program.
"""
-from __future__ import absolute_import
+from __future__ import absolute_import, with_statement
import os, signal, logging, grp
@@ -43,6 +43,18 @@ def send_signal_to_group (sig):
pgid = os.getpgrp()
os.killpg(pgid, sig)
+def get_runsystem ():
+ # check for sabayon first, as sabayon also has the gentoo release
+ for sp in ("/etc/sabayon-release", "/etc/sabayon-edition"):
+ if os.path.exists(sp):
+ with open(sp) as r:
+ return ("Sabayon", r.readline().strip())
+
+ if os.path.exists("/etc/gentoo-release"):
+ return ("Gentoo", "")
+
+ else: return ("Unknown", "")
+
def paren_reduce(mystr):
"""
Take a string and convert all paren enclosed entities into sublists, optionally
py?h=0.13&id=7b34a39da7da69a3a22b7d974c7574cb09f0d0a2&follow=1'>New plugin system - first hackRené 'Necoro' Neumann2-420/+683 2008-06-30Now the new design is able to do the same as the old oneRené 'Necoro' Neumann3-168/+182 2008-06-30First draft of the new plugin windowRené 'Necoro' Neumann1-8/+172 2008-06-30Added stuff to plugin.pyRené 'Necoro' Neumann1-2/+24 2008-06-30Beautified some dialogsRené 'Necoro' Neumann1-6/+8 2008-06-30Only add a package to mergequeue if everything went fineRené 'Necoro' Neumann1-1/+1 2008-06-26Removed '__find_resolved_unresolved' as it is quite useless.René 'Necoro' Neumann3-53/+29 2008-06-26Added very basic set queryingRené 'Necoro' Neumann3-0/+27 2008-06-25Now load 22 versions when running the correct portageRené 'Necoro' Neumann4-8/+18 2008-06-25Added Package_22 and System_22René 'Necoro' Neumann4-5/+63