Subject: Re: pkgsrc.txt and sudo
To: None <netbsd-docs@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: netbsd-docs
Date: 04/29/2007 00:25:27
On Sun, 29 Apr 2007, Aleksey Cheusov wrote:
> > On Sat, 28 Apr 2007, Aleksey Cheusov wrote:
>  >>     .if exists(${LOCALBASE}/bin/sudo)
>  >>     SU_CMD=        ${LOCALBASE}/bin/sudo /bin/sh -c
>  >>     .endif
>  >> 
>  >> First, this .if doesn't work.
> 
> > What do you mean by "doesn't work"?

> [session transcript deleted]

You still haven't explained what you mean by "doesn't work".  A
transcript is not an explanation, and your transcript doesn't
contain any evidence about whether or not ${LOCALBASE}/bin/sudo
existed at the time the .if condition was evaluated.

> Even if .if closure works,

It certainly works for me.

> it doesn't help much if I use pkg_chk for building LOTS OF
> packages using unpriviledged mode for building and sudo for
> installing/packaging.  The built will be stopped with unnecessary
> prompt.

I suggest that you install sudo before building anything else.

--apb (Alan Barrett)