Date: Tue, 5 Nov 2002 10:00:03 -0800 From: Ross Lippert <ripper@eskimo.com> To: questions@freebsd.org Subject: mapping ports to packages Message-ID: <20021105100003.A5846@eskimo.eskimo.com>
next in thread | raw e-mail | index | archive | help
I am writing a little utility to help me get an instant-workstation (the instant-workstation port is fine when you have high bandwidth, but not when you are low bandwidth and have CDs with some stuff already, blah blah blah, there are other reasons why I believe this would be a nice thing). Anyhow, I'm trying to make it flexible enough that it will fetch from ftp or the CDs or build the port, depending on user input. However, this bring up a bit of FreeBSD ugliness: port vs package names. Three bits of functionality are needed here, as I see it: 1) figuring out whether a specified package/port is installed 2) figuring out what package name to use with pkg_add -r 3) figuring out which port name to CD to to make install With the user specifying either a port name or a pkg name. If the user specifies a port directory, than #1 and #3 seem to be easy to take care of, since #1 can be check by looking for ORIGIN comments in /var/db/pkg. (note: if I go with package names, then I have to deal with their brittleness due to version information encoded in them in non-uniform way, which requires more patter matching than I really think I know how to do.) #2 is trickier. I know that somewhere in the Makefile of each port is a set of variables, such that when I concat them I can the package name, but port makefiles are a bit icky, and I was wondering if there was a quick way (like 'make package_name') to spit out the portname-->packagename map I want? So, how do I get a package name from a port nicely? -r To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021105100003.A5846>