From owner-freebsd-questions@FreeBSD.ORG Sun Oct 24 14:27:58 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F7CD16A4CE for ; Sun, 24 Oct 2004 14:27:58 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11BCF43D48 for ; Sun, 24 Oct 2004 14:27:57 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i9OERo7q081060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Oct 2004 15:27:50 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)i9OERoGV081059; Sun, 24 Oct 2004 15:27:50 +0100 (BST) (envelope-from matthew) Date: Sun, 24 Oct 2004 15:27:50 +0100 From: Matthew Seaman To: "Donald J. O'Neill" Message-ID: <20041024142750.GA80609@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , "Donald J. O'Neill" , freebsd-questions@freebsd.org References: <417B8791.20705@schmittnet.com> <200410240727.16654.donaldj1066@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <200410240727.16654.donaldj1066@fastmail.fm> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (smtp.infracaninophile.co.uk [IPv6:::1]); Sun, 24 Oct 2004 15:27:50 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040904, clamav-milter version 0.75l on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Portinstall question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 14:27:58 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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?=3D > > 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=20 > 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=20 > 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=3D41 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=20 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 --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBe7vmiD657aJF7eIRAgrQAKCc0V+OqWtGF5wS2Ji4+3i+Bf8GNQCbBfUH knCp4z0pjN+boablBV/Cpgg= =jx+p -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--