Gentoo Archives: gentoo-dev

From: Georgi Georgiev <chutz@×××.net>
To: gentoo-dev@××××××××××××.org
Subject: Re: [gentoo-dev] CONFIG_PROTECT and ROOT!='/'
Date: Tue, 15 Mar 2005 06:56:04
Message-Id: 20050315065600.GA5908@ols-dell.iic.hokudai.ac.jp
In Reply to: Re: [gentoo-dev] CONFIG_PROTECT and ROOT!='/' by Brian Jackson
1 maillog: 14/03/2005-22:24:24(-0600): Brian Jackson types
2 > On Mon, 2005-03-14 at 13:21 -0800, Donnie Berkholz wrote:
3 > > Vitaly Ivanov wrote:
4 > > > I found the comments of Nicholas Jones in bug
5 > > > http://bugs.gentoo.org/show_bug.cgi?id=52415
6 > > >>> Portage makes the assumption that if you're installing
7 > > >>> into a new root, then you're building a system and
8 > > >>> shouldn't bother with config protection. It's not
9 > > >>> documented either way, so it's undefined behavior.
10 > >
11 > > I disagree with that logic, because people may be maintaining systems in
12 > > a ROOT with modified config files. Updating those systems trashes the
13 > > files. Thank you for pointing out this behavior now, because it walks
14 > > all over plans I have for a diskless cluster.
15 >
16 > I mentioned this to the portage guys the other day. Either they didn't
17 > care, or they didn't hear me. Either way, probably need to file a bug
18 > about it (or stir up that other one).
19
20 Alright! The bug is getting attention, and it even hasn't been a year!
21
22 I posted a patch at http://bugs.gentoo.org/show_bug.cgi?id=52415 that
23 addresses the issue. You can directly do
24
25 wget http://bugs.gentoo.org/attachment.cgi?id=53496 -O - | patch -p0
26
27 which will in turn screw your portage.py, but hopefully for the best.
28
29 As I see that there are more people who are interested in the bug, I am
30 expecting at least some to trust me enough as to try out the patch and
31 in turn make some noise (yeah, noise is what we need) when it makes them
32 happy.
33
34 The other problem that bothers me (that is: reading configuration
35 files from $ROOT) seems to be worked on. At least, there are
36 comments like:
37
38 # XXX: This should depend on ROOT?
39 if os.path.exists("/"+CUSTOM_PROFILE_PATH):
40 self.user_profile_dir = os.path.normpath("/"+"///"+CUSTOM_PROFILE_PATH)
41 self.profiles.append(self.user_profile_dir[:])
42
43 ...
44
45 # XXX: Should depend on root?
46 self.mygcfg=getconfig("/"+MAKE_CONF_FILE,allow_sourcing=True)
47 if self.mygcfg == None:
48 self.mygcfg = {}
49
50
51 Which I guess means that it will sooner or later make it to the next
52 level in some form.
53
54 chutz out
55
56 --
57 *) Georgi Georgiev *) Live fast, die young, and leave a flat *)
58 (* chutz@×××.net (* patch of fur on the highway! -- The (*
59 *) +81(90)6266-1163 *) Squirrels' Motto (The "Hell's Angels of *)
60 (* ------------------- (* Nature") (*

Replies

Subject Author
Re: [gentoo-dev] CONFIG_PROTECT and ROOT!='/' Brian Jackson <iggy@g.o>