FreeBSD 7-STABLE installkernel broken

I rebuilt world/kernel today, and on installkernel, noticed it bailed out — nuking /boot/kernel/* in the process. How nice:

kern.bootfile: /boot/kernel/kernel -> /boot/kernel.old/kernel
mkdir -p /boot/kernel
install -p -m 555 -o  -g  kernel /boot/kernel
install: -g: Invalid argument
*** Error code 67

Stop in /usr/obj/usr/src/sys/GENERIC
*** Error code 1

The nuking of /boot/kernel/* is caused indirectly — as you can see, the install line fails due to variable expansions not happening, resulting in the variables being empty, which ends up botching the passed arguments. I must’ve spent 3 hours poking at this, including booting up VMWare and installing 7.1-RELEASE then csup’ing just to reproduce the same problem.

After much mailing list searching, I finally found the root cause:

The only three words coming out of my mouth right now are “test your changes before you commit your shit”. Why are people committing without fully testing prior (that includes world and kernel, both build and install)? This is completely unacceptable. Mistakes happen, but this is not a “oops sorry” mistake, this is flat out negligence.