Date: Sun, 24 Oct 2004 10:50:25 -0400 From: "Bill Schmitt (SW)" <software@schmittnet.com> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Portinstall question Message-ID: <417BC131.6040200@schmittnet.com> In-Reply-To: <20041024142750.GA80609@happy-idiot-talk.infracaninophile.co.uk> References: <417B8791.20705@schmittnet.com> <200410240727.16654.donaldj1066@fastmail.fm> <20041024142750.GA80609@happy-idiot-talk.infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote: On Sun, Oct 24, 2004 at 07:27:16AM -0500, Donald J. O'Neill wrote: On Sunday 24 October 2004 05:44 am, Bill Schmitt (SW) wrote: I think I'm missing something basic, so if someone could point me to where that is, I would appreciate it. I been installing software using portinstall, but I think I'm missing something basic because there seems to be more guesswork involved that I expected there to be. How do you know what name to use for the portinstall to work? For example, I wanted to install MySQL 41. The folders under /usr/ports/databases include several variations on my-sql. Among others are mysql323-server, mysql40-server, mysql41-server, and mysql50-server. In the Makefile for mysql41 it states PORTNAME?= mysql. But trying "portinstall mysql" or "portinstall mysql41" or "portinstall mysql41-server" all result in a message that the port doesn't exist. The command that works is "portinstall mysql-server", which I found with a basic google search, but I don't find that in the descriptions or Makefiles. Looking just at what is in the ports tree (or anywhere else on a 4.9 system), where would I properly find that name? I was just wondering why you would want to use portinstall to install new software, rather than (using your example port): cd /usr/ports/databases/mysql-server41 make install Is using portinstall magical in some way? If you use the make install method, there isn't any guesswork as to what name to use. portinstall is just portupgrade by another name. Infact, it's pretty much identical to 'portungrade -f'. As to why anyone would want to use portupgrade? That's a no-brainer. Just try it and you'll see. To answer the original question, portupgrade or portinstall can select a port to operate on in two ways. You can either give it the package name -- with or without the version number -- or you can give it the port origin -- ie. the port directory relative to /usr/ports. Now, usually, the first part of package name is the same as the last part of the port origin, but not always. For instance the www/apache2 port installs apache-2.0.52_1. That similarity of names is what was confusing the OP. He could either have issued the command: # portinstall mysql-server-4.1.6 or # portinstall databases/mysql41-server and it all would have worked. The command he did use: # portinstall mysql-server worked for him, but that was partly a matter of luck, as it happened to default to the 4.1.x branch of MySQL. (Maybe he had WANT_MYSQL_VER=41 defined in /etc/make.conf or some such -- the default is to install databases/mysql40-server) To find out what package name a port will install, just: % cd /usr/ports/databases/mysql41-server % make -V PKGNAME portupgrade processes the /usr/ports/INDEX file into a database of port origins and package names, which is why you always need an up-to-date INDEX when using it. Cheers, Matthew Actually, I found the correct entry by searching for "portinstall mysql" through google until I found an example that included some results other than not found. (WANT_MYSQL_VER was not defined). Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?417BC131.6040200>