Subject: Re: identify packages that were custom built?
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/20/2007 10:46:58
On Wed, 19 Sep 2007, Johnny C. Lam wrote:

> It would be nice if a "make update" or "make replace" would try to grab the
> PKG_OPTIONS of the currently installed package and use those as the package
> options for the new build.
> 
> I guess putting something like this at the end of bsd.options.mk would
> suffice:
> 
> 	.if defined(PKG_OPTIONS_OVERRIDE)
> 	PKG_OPTIONS=	${PKG_OPTIONS_OVERRIDE}
> 	.endif
> 
> Then you could do:
> 
> 	cd pkgsrc/net/samba
> 	make build PKG_OPTIONS_OVERRIDE=`pkg_info -Q PKG_OPTIONS samba`
> 
> And possibly make the "update" and "replace" targets automatically set
> PKG_OPTIONS_OVERRIDE in the same manner.

I think this feature would be fine if it was optional, not turned on by 
default, and documented with warning about unexpected build or option 
changes.

We may want to look at FreeBSD for example:

/var/db/ports/${portname}/options  -- store your options used by builds

make showconfig -- show them

make rmconfig -- remove them

This assumes you use same system to do builds.

FreeBSD also provides menus to select options during the build -- but I 
don't like that "interactive" feature myself.

  Jeremy C. Reed