New /bin/sh based script to manage ports
dougb at FreeBSD.org
Sat Jan 7 00:45:06 PST 2006
Jeremy Messenger wrote:
> I haven't play with your script yet, but I only read it so far.
Thanks for taking a look, and for your feedback.
> I think
> you should get your script to be able to read in the make.conf (by
> include) for PKG_DBDIR, PORTSDIR, DISTDIR and etc in case if someone
> tweak it. I think it's more friendly with ports that way.
This is a reasonable request, and I should point out that the script does
handle DISTDIR properly now. However, the other two present a chicken and
egg problem if I choose to use 'make -V' to get the values of these
variables (where do I cd to?). There is an alternative, which is to use code
similar to what I wrote for the current version of /etc/rc.d/devfs to parse
/etc/make.conf manually, but even that is subject to error. For example, I
separate my base stuff into /etc/make.conf and ports to /etc/make-ports.conf.
If there is a lot of call for this, I could add command line options (that
could subsequently be read from a portmaster.rc file) although I'm sensitive
to the issue that users who relocate these directories already have a lot of
places to set those options. OTOH, I put my ports tree in a different
directory than /usr/ports, but I learned long ago that the easiest way to
handle that is to create a symlink to it in /usr. YMMV of course.
I've uploaded a new version that fixes a typo that was reported here, and
removes references to the name I used for the script during development.
http://dougbarton.us/portmaster.html if anyone is still interested. Thanks
to all those who've provided feedback so far.
This .signature sanitized for your protection
More information about the freebsd-ports