summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2010-10-23 15:55:54 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2010-10-23 15:55:54 +0200
commitca07bd1d6ce442a61109a95ead62a0b0a53aaf79 (patch)
treeee4328768b68685578fc0da1c2e8623e84f4bb3d
parentstring module is deprecated (diff)
downloadgentoo-bumpchecker-ca07bd1d6ce442a61109a95ead62a0b0a53aaf79.tar.gz
gentoo-bumpchecker-ca07bd1d6ce442a61109a95ead62a0b0a53aaf79.tar.bz2
gentoo-bumpchecker-ca07bd1d6ce442a61109a95ead62a0b0a53aaf79.zip
Fix API usage with >=portage-2.2_rc97
-rw-r--r--modules/portage_module.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/portage_module.py b/modules/portage_module.py
index 8d661ba..3daf9f4 100644
--- a/modules/portage_module.py
+++ b/modules/portage_module.py
@@ -24,7 +24,7 @@ def split_package_into_parts(package_name):
# given a package name, find the category in portage.
# This will return None if you do not give it a version.
def find_category(package_name):
- package = portage.cpv_expand(package_name, mydb=portage.db["/"][get_dbtree()].dbapi, use_cache=1)
+ package = portage.cpv_expand(package_name, mydb=portage.db["/"][get_dbtree()].dbapi, use_cache=1, settings=portage.settings)
# catsplit returns ['category', 'packagename']
package = portage.catsplit(package)
@@ -93,14 +93,16 @@ def find_packages_in_tree(package_list, portdir=None, all_overlays=False, overla
# stable
mysettings = portage.config(clone=portdbsettings)
mysettings['ACCEPT_KEYWORDS'] = 'amd64' # the arch I care for :]
+ mysettings.repositories = portdbsettings.repositories
olddbapi_kw = portdbapi
- portdbapi = portage.portdbapi(mysettings['PORTDIR'], mysettings)
+ portdbapi = portage.portdbapi(mysettings['PORTDIR'], mysettings=mysettings)
else:
#testing
mysettings = portage.config(clone=portdbsettings)
mysettings['ACCEPT_KEYWORDS'] = 'amd64 ~amd64' # the arch I care for :]
+ mysettings.repositories = portdbsettings.repositories
olddbapi_kw = portdbapi
- portdbapi = portage.portdbapi(mysettings['PORTDIR'], mysettings)
+ portdbapi = portage.portdbapi(mysettings['PORTDIR'], mysettings=mysettings)
if portdir is not None:
mysettings = portage.config(clone=portdbsettings)