portage.writemsg(gcc_not_found_error, noiselevel=-1)
return "[unavailable]"
-def getportageversion(portdir, target_root, profile, chost):
+def getportageversion(portdir, target_root, profile, chost, vardb):
try:
import re
profilever = os.path.normpath("///"+os.readlink(profile))
except (OSError,IOError):
profilever="unavailable"
libcver=[]
- libclist = portage.vardbapi(target_root).match("virtual/libc")
- libclist += portage.vardbapi(target_root).match("virtual/glibc")
+ libclist = vardb.match("virtual/libc")
+ libclist += vardb.match("virtual/glibc")
libclist = portage_util.unique_array(libclist)
for x in libclist:
xs=portage.catpkgsplit(x)
def action_info(myopts):
unameout=commands.getstatusoutput("uname -mrp")[1]
settings = portage.settings
+ trees = portage.db
print getportageversion(settings["PORTDIR"], settings["ROOT"],
- settings.profile_path, settings["CHOST"])
+ settings.profile_path, settings["CHOST"],
+ trees[settings["ROOT"]]["vartree"].dbapi)
print "================================================================="
print "System uname: "+unameout
if os.path.exists("/etc/gentoo-release"):
if "--version" in myopts:
settings = portage.settings
print getportageversion(settings["PORTDIR"], settings["ROOT"],
- settings.profile_path, settings["CHOST"])
+ settings.profile_path, settings["CHOST"],
+ trees[settings["ROOT"]]["vartree"].dbapi)
sys.exit(0)
elif "--help" in myopts:
emergehelp.help(myaction, myopts, havecolor)