Subject: Re: Changing Solaris LOCALBASE from /usr/local to /usr/pkg
To: David Brownlee <abs@netbsd.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 07/17/2001 10:39:33
Looks good to me - not tested here, though.

Thanks,
Al

On Mon, Jul 16, 2001 at 09:06:31PM +0100, David Brownlee wrote:
> 	So far the best(?) I have for this is included below. Any objections,
> 	or suggestions on how to better handle it?
> 
> --- bsd.prefs.mk        2001/07/10 16:37:13     1.53
> +++ bsd.prefs.mk        2001/07/16 20:06:51
> @@ -274,7 +274,19 @@
>  .if (${OPSYS} == "NetBSD")
>  PKG_TOOLS_BIN?=                /usr/sbin
>  .elif (${OPSYS} == "SunOS")
> -LOCALBASE?=             ${DESTDIR}/usr/local
> +# Migration aid for old /usr/local LOCALBASE on Solaris
> +.if !defined(LOCALBASE) && exists(${DESTDIR}/usr/local/libexec/cgi-bin) && \
> +       !exists(${DESTDIR}/usr/pkg/libexec/cgi-bin)
> +.BEGIN:
> +       @echo "On Solaris and /usr/local/libexec/cgi-bin found:"
> +       @echo "- If you have an existing pkgsrc installation & wish to continue"
> +       @echo "  using /usr/local, append LOCALBASE=/usr/local to /etc/mk.conf."
> +       @echo "- Otherwise set LOCALBASE=/usr/pkg in your environment for the"
> +       @echo "  first package install.
> +       @false
> +.endif
> +# end of migration aid
> +LOCALBASE?=             ${DESTDIR}/usr/pkg
>  .if !defined(ZOULARISBASE)
>  ZOULARISBASE:=         ${LOCALBASE}/bsd
>  .endif
> 
> 
> -- 
> 		David/absolute		-- www.netbsd.org: No hype required --
> 
> 
> On Sun, 8 Jul 2001, Alistair Crooks wrote:
> 
> > On Sun, Jul 08, 2001 at 02:45:12PM +0100, David Brownlee wrote:
> > > 	I'd like to change the default Solaris LOCALBASE to match that
> > > 	of NetBSD and Linux (/usr/pkg).
> > >
> > >         In order to avoid hosing any existing Solaris pkgsrc users I
> > > 	propose adding a check which causes pkgsrc to error out if the
> > > 	following four conditions are met:
> > > 		+ Running on Solaris
> > > 		+ LOCALBASE is not set in mk.conf or environment
> > > 		+ /usr/local/libexec/cgi-bin is present
> > > 		+ /usr/pkg/libexec/cgi-bin is not present
> > >
> > > 	New installations would automatically pick up /usr/pkg, existing
> > > 	users who have not set LOCALBASE and who want to keep /usr/local
> > > 	would need to add it to their mk.conf
> > >
> > > 	If there are no objections I'll go ahead with this later this
> > > 	week.
> >
> > No objection from me - it has been a matter of extreme shame to me
> > that I used /usr/local for the default Solaris LOCALBASE setting.
> > It made sense at the time, with the infrastructure I was using, but
> > should have been changed before the Solaris changes hit our tree.
> >
> > Sorry,
> > Alistair (who will re-surface RSN)
> >
> >