tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: updating a piece of the running system from build.sh is too hard



On Mon, Mar 01, 2010 at 08:05:32AM -0500, Greg Troxel wrote:
 > > ISTM (if we're talking about rearranging stuff) that this should be
 > > "install", and the install that goes into $OBJ/destdir.$ARCH/...
 > > should be called something else, like stage-install or install-staging
 > > or whatnot.
 > 
 > I disagree, because there is historically one notion of install and the
 > destdir setup as part of build.sh and make variables says where that
 > goes.  install should go into DESTDIR, always.

Yes, historically there's one notion of install. Historically, the
system build installs a new libc into /usr/lib and then recompiles the
rest of the tree against it, and if it turns out to be no good you'd
better have an /altroot or similar handy. This is not a good model,
and therefore we don't do that any more; we build into a private
DESTDIR and then install separately to another DESTDIR afterwards.

Given that there are two DESTDIRs it doesn't help anything to say that
install should always go into DESTDIR. The whole point of my previous
post is that sometimes you want one and sometimes you want the other,
and therefore you should select what you want (stage-install vs.
install, for example) rather than muck around changing DESTDIR and
hoping the right things happen.

(Note also that right now the depend info becomes incorrect if you
change DESTDIR on the fly; this theoretically shouldn't affect install
targets but it's nonetheless a potential risk.)

 > What I was trying to do is say
 > 
 >   I know the build was set up to go to DESTDIR, and UNPRIVED, and I know
 >   that I could set USETOOLS=no and redo the build and install normally,
 >   but what I want now is to reuse the existing build and do an
 >   installation into a different place, without UNPRIVED.

Right, which is exactly the point. (UNPRIVED is a distraction; that
should always just work on its own.)

 > > A full build should always build into the local destdir (and IMO it
 > > should always use METALOG, but that's a separate discussion) and not
 > > touch the ultimate destdir (which is usually /) until its final
 > > install phase. However, if I manually do 'make && make install'
 > > somewhere it normally means I want to install directly into the
 > > ultimate destdir.
 > 
 > Sometimes for me it means I want to just freshen the configured destdir.

Yes, then you'd do 'stage-install' or whatever someone decides to call
it.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index