Gentoo Archives: gentoo-portage-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] config_root variables in pym/portage/
Date: Sun, 12 Jul 2009 12:25:08
1 In Prefix, there is a distinction between variables used with
2 config_root and target_root. Quoting from prefix'
4 # We have a most confusing situation here, which is most of all pretty
5 # weak for protecting us from making mistakes.
6 # First there is a config_root (PORTAGE_CONFIGROOT) which can be a path
7 # somewhere, from which all paths need to be relative (e.g.
8 # etc/portage), hence those constants do NOT have EPREFIX, because
9 # config_root contains EPREFIX by default -- overriding it loses the
10 # EPREFIX as one would expect.
11 # Second there is target_root (ROOT) which is to install somewhere
12 # completely else, in Prefix of limited use. Because this is an offset
13 # always given, the EPREFIX should always be applied in it. Those
14 # constants (like VDB_PATH) DO have EPREFIX.
15 # Unfortunately this file is ordered quite horrible in this respect.
17 The attached patch makes all variables against config_root relative (by
18 removing the leading '/'), with the result that all lstrip(os.sep) calls
19 in the code can be removed. Please note that all but two occurences did
20 use config_root. For one (pym/portage/; sandbox stuff) I've
21 added it, for the other (in pym/portage/ I don't know how to
22 get config_root, so substituted '/', which breaks Prefix by design.
24 How about this patch, and if it is a good idea, how about grouping all
25 of these config_root variables such that it's easier to see what is
26 what? I actually ran into this because Sebastian was hitting it with
27 his smolt-gentoo tool.
30 --
31 Fabian Groffen
32 Gentoo on a different level


File name MIME type
config_root-vs-target_root.patch text/plain