Use grabfile instead of cat to display the gentoo-release file.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Oct 2006 16:27:39 +0000 (16:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Oct 2006 16:27:39 +0000 (16:27 -0000)
svn path=/main/trunk/; revision=4658

bin/emerge

index ee53b647ea9c2ad08529610ef26f983f1716d381..16317abf08443f86542e96074d64a570d35cdea1 100755 (executable)
@@ -3292,8 +3292,10 @@ 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
-       if os.path.exists("/etc/gentoo-release"):
-               os.system("cat /etc/gentoo-release")
+       gentoo_release = portage.grabfile(os.path.join(
+               settings["PORTAGE_CONFIGROOT"], "etc", "gentoo-release"))
+       if gentoo_release:
+               print gentoo_release[0]
        else:
                print "Unknown Host Operating System"
        lastSync = portage.grabfile(os.path.join(