Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-05-02 Thread David Holland
On Wed, Apr 28, 2010 at 02:57:47PM -0400, der Mouse wrote: >>> To wit: as far as I can tell, having been wading around in that code >>> recently, the only problem with what we have is that if the path >>> sent back by namei isn't absolute it needs a getcwd() stuck on the >>> front of it. > >

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-28 Thread der Mouse
>> To wit: as far as I can tell, having been wading around in that code >> recently, the only problem with what we have is that if the path >> sent back by namei isn't absolute it needs a getcwd() stuck on the >> front of it. >> Is it reasonable to just do that? I don't think so. It would be a r

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-28 Thread David Laight
On Wed, Apr 21, 2010 at 05:40:57AM +, David Holland wrote: > On Thu, Apr 15, 2010 at 08:40:19AM +, David Holland wrote: > >> Wish we had working $ORIGIN... > > > > We will fairly soon, I think... :-) > > To wit: as far as I can tell, having been wading around in that code > recently, t

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-22 Thread David Holland
On Thu, Apr 22, 2010 at 10:05:45AM -0400, Christos Zoulas wrote: > | For the time being what we can do is take the path sent back from > | namei, and if it's not absolute call getcwd and graft that onto the > | front. This will in general yield a partially realpath'd path but I > | don't think

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-22 Thread Christos Zoulas
On Apr 22, 5:02am, dholland-t...@netbsd.org (David Holland) wrote: -- Subject: Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works) | I had convinced myself it was supposed to fail if it had to look | outside the cache, but that's only true for the first step. Correct. Or if someone remov

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-21 Thread David Holland
On Wed, Apr 21, 2010 at 01:22:12PM -0400, Christos Zoulas wrote: > | If you exec "../bin/foo", that's all namei will resolve or touch, and > | that's the string that'll come back from namei. If we want an absolute > | path out, it needs getcwd, either in exec or in namei... and in exec > | is p

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-21 Thread Christos Zoulas
On Apr 21, 3:41pm, dholland-t...@netbsd.org (David Holland) wrote: -- Subject: Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works) | On Wed, Apr 21, 2010 at 08:58:31AM -0400, Christos Zoulas wrote: | > | Is it reasonable to just do that? I don't think calling getcwd() from | > | ex

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-21 Thread David Holland
On Wed, Apr 21, 2010 at 08:58:31AM -0400, Christos Zoulas wrote: > | Is it reasonable to just do that? I don't think calling getcwd() from > | exec is going to cause locking problems, but it might be more overhead > | than we want to swallow. > > The code that we have there works fine now, ya

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-21 Thread Christos Zoulas
On Apr 21, 5:40am, dholland-t...@netbsd.org (David Holland) wrote: -- Subject: $ORIGIN (was: Re: make: ensure ${.MAKE} works) | On Thu, Apr 15, 2010 at 08:40:19AM +, David Holland wrote: | >> Wish we had working $ORIGIN... | > | > We will fairly soon, I think... :-) | | To

$ORIGIN (was: Re: make: ensure ${.MAKE} works)

2010-04-20 Thread David Holland
On Thu, Apr 15, 2010 at 08:40:19AM +, David Holland wrote: >> Wish we had working $ORIGIN... > > We will fairly soon, I think... :-) To wit: as far as I can tell, having been wading around in that code recently, the only problem with what we have is that if the path sent back by namei isn'