Subject: Re: make replace changes
To: Greg Troxel <gdt@ir.bbn.com>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 11/07/2007 17:07:11
Greg Troxel wrote:
> I just committed changes to allow make replace to deal with package
> renaming (e.g., GConf2 -> GConf).  This was discussed a few months ago
> and an earlier attempt backed out due to problems.
> 
> An example:
> 
>   cd /usr/pkgsrc/devel/GConf
>   make replace OLDNAME=GConf2
> 
> will build GConf and remove the installed GConf2 package, moving the
> +REQUIRED-BY file to the new GConf.  make replace behavior without
> +OLDNAME should be unchanged.
> 
> I have tested this as well as I can on NetBSD-current, and I don't think
> I added anything nonportable.  I would apprecciate review, particularly
> variable quoting issues.

You didn't test very well. ;)

$ cd mk/flavor/pkg
$ pkglint deinstall.mk replace.mk
...
WARN: deinstall.mk:33--45: $OLDNAME is ambiguous. Use ${OLDNAME} if you 
mean a Makefile variable or $$OLDNAME if you mean a shell variable.
...

Roland