pkgsrc-Users archive

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

Re: Perplexed about LOCALBASE vs. SU_CMD



On Thu, 28 Sep 2017, Alistair Crooks wrote:

> LOCALBASE must be set at the time of the .if statement (it's like a
> CPP conditional, and is evaluated immediately), and at the top of my
> etc/mk.conf, I have
> 
> LOCALBASE?=     /usr/pkg
> 
> before anything else - which is why it works for me.

I have historically refrained from setting a variable if the default
value is what I want anyway.  I find it confusing.

The upshot is that the default for LOCALBASE is not yet set at the time
"/etc/mk.conf" is evaluated, so even if one expects simply to use the
default value, it must be set explicitly for the conditional
(re)definition of SU_CMD to work as described.

This has been the piece of information missing every time I've seen this
procedure mentioned until now.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index