Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] config_root variables in pym/portage/const.py
Date: Sun, 12 Jul 2009 20:50:34
Message-Id: 4A5A4C59.4060409@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] config_root variables in pym/portage/const.py by Fabian Groffen
1 Fabian Groffen wrote:
2 > The attached patch makes all variables against config_root relative (by
3 > removing the leading '/'), with the result that all lstrip(os.sep) calls
4 > in the code can be removed. Please note that all but two occurences did
5 > use config_root. For one (pym/portage/__init__.py; sandbox stuff) I've
6 > added it, for the other (in pym/portage/output.py) I don't know how to
7 > get config_root, so substituted '/', which breaks Prefix by design.
8
9 Your patch is in svn r13821.
10
11 I've added a comment in output.py that we can use ObjectProxy to
12 implement lazy initialization of codes and _styles, and add an
13 init(config_root="/") function that can be called in order adjust
14 the location that color.map is read from.
15
16 > How about this patch, and if it is a good idea, how about grouping all
17 > of these config_root variables such that it's easier to see what is
18 > what? I actually ran into this because Sebastian was hitting it with
19 > his smolt-gentoo tool.
20
21 Yes, please go ahead and group the variables if you like. Feel free
22 to commit it yourself.
23
24 --
25 Thanks,
26 Zac

Replies