summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-08 19:28:21 -0800
committerZac Medico <zmedico@gentoo.org>2011-03-08 19:28:21 -0800
commit6b604d43c68cab45ea5668042a53c23d4012bb18 (patch)
treea158e951a06540eac984a4b586565337019edc36
parentcab19378be406d18a80114d00007e12b3310586d (diff)
downloadportage-6b604d43c68cab45ea5668042a53c23d4012bb18.tar.gz
portage-6b604d43c68cab45ea5668042a53c23d4012bb18.tar.bz2
portage-6b604d43c68cab45ea5668042a53c23d4012bb18.zip
unmerge: use vardbapi._dblink() to simplify
The dblink constructor is complex and best avoided.
-rw-r--r--pym/_emerge/unmerge.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py
index a6a330cd3..68b61edc2 100644
--- a/pym/_emerge/unmerge.py
+++ b/pym/_emerge/unmerge.py
@@ -7,7 +7,6 @@ import logging
import sys
import textwrap
import portage
-import portage.dbapi.vartree
from portage import os
from portage.output import bold, colorize, darkgreen, green
from portage._sets import SETPREFIX
@@ -321,9 +320,7 @@ def unmerge(root_config, myopts, unmerge_action,
msg = ("Not unmerging package %s since there is no valid reason "
"for Portage to unmerge itself.") % (pkg.cpv,)
skip_pkg = True
- elif portage.dbapi.vartree.dblink(pkg.category, pkg.pf,
- settings=settings, treetype="vartree", vartree=vartree,
- scheduler=scheduler).isowner(portage._python_interpreter):
+ elif vartree.dbapi._dblink(cpv).isowner(portage._python_interpreter):
msg = ("Not unmerging package %s since there is no valid reason "
"for Portage to unmerge currently used Python interpreter.") % (pkg.cpv,)
skip_pkg = True