Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Fabian Groffen <grobian@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] config_root variables in pym/portage/const.py
Date: Tue, 18 Aug 2009 06:05:46
Message-Id: 4A8A44C9.3060509@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] config_root variables in pym/portage/const.py by Zac Medico
1 Zac Medico wrote:
2 > Fabian Groffen wrote:
3 >> The attached patch makes all variables against config_root relative (by
4 >> removing the leading '/'), with the result that all lstrip(os.sep) calls
5 >> in the code can be removed. Please note that all but two occurences did
6 >> use config_root. For one (pym/portage/__init__.py; sandbox stuff) I've
7 >> added it, for the other (in pym/portage/output.py) I don't know how to
8 >> get config_root, so substituted '/', which breaks Prefix by design.
9 >
10 > Your patch is in svn r13821.
11 >
12 > I've added a comment in output.py that we can use ObjectProxy to
13 > implement lazy initialization of codes and _styles, and add an
14 > init(config_root="/") function that can be called in order adjust
15 > the location that color.map is read from.
16
17 I've added an _init(config_root="/") function like this in r14083.
18 --
19 Thanks,
20 Zac

Replies