Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] portage management node
Date: Sun, 09 Apr 2006 17:27:25
Message-Id: 443943F7.6030900@gentoo.org
In Reply to: [gentoo-portage-dev] portage management node by Eldad Zack
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Eldad Zack wrote:
5 > Another detail I need to sort out - does portage use ${ROOT}/etc/ or
6 > just /etc ? Since I would need to store the useflags and customization for
7 > each remote host, it is a requirement.
8
9 There was some disagreement on bug 40302 as to whether or not some files (those in /etc for example) should be relative to ROOT. We could have a config format that works for multiple installations simultaneously (multiple values of ROOT) or one that keeps them separate (different config files for each value of ROOT). Given that make.conf, /etc/portage, and such were never designed to work for multiple installations simultaneously, I think they should be relative to ROOT.
10
11 > I've came across another problem as well.
12 > importing portage will go through its initialization, checking VDB and sorts,
13 > so that if I'd like in to switch a VDB I'll have to re-import portage. Since
14 > I do not know of a way to re-import portage in python, I've worked around
15 > this by changing ROOT env and then call portage via os.system calls.
16 > On my humble amd 2600 machine this yields a 8 seconds average per VDB change.
17 >
18 > Is there something I can do beside replicating the init code into a function,
19 > change root and recall the init function again?
20 >
21 > Is there a better way of doing this?
22
23 In python's built-in global function list you'll see one called reload(). If you call reload(portage), it causes a re-import of the module.
24
25 Zac
26
27 -----BEGIN PGP SIGNATURE-----
28 Version: GnuPG v1.4.2.2 (GNU/Linux)
29
30 iD8DBQFEOUP2/ejvha5XGaMRAmTlAJ0ZuccDgmfvcKSyaDpgOvAD2hAYSwCg25X3
31 qKrPjkwQnh3IOY2bIvSUfJs=
32 =vG30
33 -----END PGP SIGNATURE-----
34 --
35 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] portage management node Brian <dol-sen@×××××.net>