DESTDIR implementation [Was:: ATTENTION: is the way DESTDIR was introduced completely wrong?]

John E Hein jhein at timing.com
Wed Aug 16 18:15:48 UTC 2006


Kris Kennaway wrote at 13:36 -0400 on Aug 16, 2006:
 > mount_nullfs ${PORTSDIR} ${DESTDIR}${PORTSDIR}
 > mount_nullfs ${WRKDIR} ${DESTDIR}${WRKDIR}
 > mount_devfs foo ${DESTDIR}/dev
 > chroot ${DESTDIR} cd ${.CURDIR} && make install
 > 
 > A suitable version of the above should allow all ports to be installed
 > into a jail-ready filesystem hierarchy, while requiring 0 port
 > changes.

I do that, too - we _have_ to since DESTDIR never worked right.
That's more heavyweight than a DESTDIR chroot (which doesn't need to
have much more than pkg* tools & libc & a few others), but that's a
very minor advantage over a full chroot (and probably not worth trying
to special case).  My original DESTDIR "fix" didn't involve a chroot
at all, but runs into problems with pkg management.

Note that if we go that route (just run completely within a chroot),
we might as well just rip DESTDIR support out of Mk/*.mk altogether.
That would be better than the "fake" support for DESTDIR.


More information about the freebsd-ports mailing list