From af81292035e8d3559b11ab16fc54ccd921cb3587 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Fri, 15 Jul 2011 23:02:07 -0500 Subject: [PATCH] Fix updated Package class to work correctly with prefix portage --- pym/gentoolkit/package.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pym/gentoolkit/package.py b/pym/gentoolkit/package.py index 45e59bd..85dbfd0 100644 --- a/pym/gentoolkit/package.py +++ b/pym/gentoolkit/package.py @@ -55,15 +55,22 @@ from gentoolkit.cpv import CPV from gentoolkit.dbapi import PORTDB, VARDB from gentoolkit.keyword import determine_keyword from gentoolkit.flag import get_flags +from gentoolkit.eprefix import EPREFIX # ======= # Settings # ======= -default_settings = portage.config(local_config=True) -default_settings.lock() -nolocal_settings = portage.config(local_config=False) -nolocal_settings.lock() +if EPREFIX: + default_settings = portage.config(local_config=True, _eprefix=EPREFIX) + default_settings.lock() + nolocal_settings = portage.config(local_config=False, _eprefix=EPREFIX) + nolocal_settings.lock() +else: + default_settings = portage.config(local_config=True) + default_settings.lock() + nolocal_settings = portage.config(local_config=False) + nolocal_settings.lock() # ======= # Classes -- 2.26.2