if quiet:
glsaconfig["EMERGE_OPTS"] += " --quiet"
-vardb = portage.db["/"]["vartree"].dbapi
-portdb = portage.db["/"]["porttree"].dbapi
+vardb = portage.db[portage.root]["vartree"].dbapi
+portdb = portage.db[portage.root]["porttree"].dbapi
# Check that we really have a glsa dir to work on
if not (os.path.exists(glsaconfig["GLSA_DIR"]) and os.path.isdir(glsaconfig["GLSA_DIR"])):
warnings.warn("Deprecated. Use helpers2.find_packages.", DeprecationWarning)
try:
if masked:
- t = portage.db["/"]["porttree"].dbapi.xmatch("match-all", search_key)
- t += portage.db["/"]["vartree"].dbapi.match(search_key)
+ t = portage.db[portage.root]["porttree"].dbapi.xmatch("match-all", search_key)
+ t += portage.db[portage.root]["vartree"].dbapi.match(search_key)
else:
- t = portage.db["/"]["porttree"].dbapi.match(search_key)
- t += portage.db["/"]["vartree"].dbapi.match(search_key)
+ t = portage.db[portage.root]["porttree"].dbapi.match(search_key)
+ t += portage.db[portage.root]["vartree"].dbapi.match(search_key)
# catch the "amgigous package" Exception
except ValueError as e:
if isinstance(e[0],list):
t = []
for cp in e[0]:
if masked:
- t += portage.db["/"]["porttree"].dbapi.xmatch("match-all", cp)
- t += portage.db["/"]["vartree"].dbapi.match(cp)
+ t += portage.db[portage.root]["porttree"].dbapi.xmatch("match-all", cp)
+ t += portage.db[portage.root]["vartree"].dbapi.match(cp)
else:
- t += portage.db["/"]["porttree"].dbapi.match(cp)
- t += portage.db["/"]["vartree"].dbapi.match(cp)
+ t += portage.db[portage.root]["porttree"].dbapi.match(cp)
+ t += portage.db[portage.root]["vartree"].dbapi.match(cp)
else:
raise ValueError(e)
except portage_exception.InvalidAtom as e:
warnings.warn("Deprecated. Use helpers2.find_installed_packages.",
DeprecationWarning)
try:
- t = portage.db["/"]["vartree"].dbapi.match(search_key)
+ t = portage.db[portage.root]["vartree"].dbapi.match(search_key)
# catch the "amgigous package" Exception
except ValueError as e:
if isinstance(e[0],list):
t = []
for cp in e[0]:
- t += portage.db["/"]["vartree"].dbapi.match(cp)
+ t += portage.db[portage.root]["vartree"].dbapi.match(cp)
else:
raise ValueError(e)
except portage_exception.InvalidAtom as e:
matched the search key."""
warnings.warn("Deprecated. Use helpers2.find_best_match.",
DeprecationWarning)
- t = portage.db["/"]["porttree"].dep_bestmatch(search_key)
+ t = portage.db[portage.root]["porttree"].dep_bestmatch(search_key)
if t:
return Package(t)
return None
@rtype: list of strings
@return: a list with the matching versions
"""
- db = portage.db["/"][portdbname].dbapi
+ db = portage.db[portage.root][portdbname].dbapi
if atom[2] == "~":
return revisionMatch(atom, db, match_type=match_type)
elif match_type == "default" or not hasattr(db, "xmatch"):
if portage.pkgcmp(c_pv[1:], i_pv[1:]) > 0 \
and (update == "" \
or (minimize ^ (portage.pkgcmp(c_pv[1:], portage.catpkgsplit(update)[1:]) > 0))) \
- and portage.db["/"]["porttree"].dbapi.aux_get(c, ["SLOT"]) == portage.db["/"]["vartree"].dbapi.aux_get(vuln, ["SLOT"]):
+ and portage.db[portage.root]["porttree"].dbapi.aux_get(c, ["SLOT"]) == portage.db[portage.root]["vartree"].dbapi.aux_get(vuln, ["SLOT"]):
update = c_pv[0]+"/"+c_pv[1]+"-"+c_pv[2]
if c_pv[3] != "r0": # we don't like -r0 for display
update += "-"+c_pv[3]