summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/emerge/__init__.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index e92df3627..f220a09c6 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -5136,12 +5136,19 @@ def action_info(settings, trees, myopts, myfiles):
print header_title.rjust(int(header_width/2 + len(header_title)/2))
print header_width * "="
print "System uname: "+unameout
- gentoo_release = portage.grabfile(os.path.join(
- settings["PORTAGE_CONFIGROOT"], "etc", "gentoo-release"))
- if gentoo_release:
- print gentoo_release[0]
- else:
+
+ files = ('gentoo-release', 'redhat-release', 'lsb-release')
+ os_found = False
+ for f in files:
+ path = os.path.join(settings["ROOT"], '/etc/', f)
+ if os.path.exists(path):
+ lines = open(path).readlines()
+ map(writemsg, lines)
+ os_found = True
+ break
+ if not os_found:
print "Unknown Host Operating System"
+
lastSync = portage.grabfile(os.path.join(
settings["PORTDIR"], "metadata", "timestamp.chk"))
print "Timestamp of tree:",