From owner-freebsd-ports Tue Nov 21 16:19:24 2000 Delivered-To: freebsd-ports@freebsd.org Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by hub.freebsd.org (Postfix) with ESMTP id 1641537B479 for ; Tue, 21 Nov 2000 16:19:22 -0800 (PST) Received: from nightshade (jasonrm@nightshade.acl.lanl.gov [128.165.147.175]) by acl.lanl.gov (8.8.8/8.8.5) with SMTP id RAA327692 for ; Tue, 21 Nov 2000 17:19:21 -0700 (MST) From: "Jason R. Mastaler" Date: Tue, 21 Nov 2000 17:19:15 -0700 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="iso-8859-1" To: freebsd-ports@freebsd.org Subject: problem manipulating ports programatically MIME-Version: 1.0 Message-Id: <00112117191502.01897@nightshade> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Suppose I want to write a simple program to look at what ports I currently have installed, and then re-make and re-install all of them. Is there a way to do this without conflicting with the multi-lingual versions of the port, or other ports of the same name? For example, the `mutt' mail reader has three locations in the ports tree: # whereis mutt mutt: /usr/ports/chinese/mutt /usr/ports/japanese/mutt /usr/ports/mail/mutt I could use something like the following to print a nice list of each "PORTNAME" I have installed: # pkg_info -aI | cut -d "-" -f 1 | sort Then I could take that list and find a matching directory in /usr/ports to cd into and do the "make reinstall" or whatever. However, if I do that I might get "chinese/mutt" instead of "mail/mutt" simply because both ports have the same base directory (mutt). This task would be much easier if: 1) I could somehow tell where an installed port came from: (mutt = "mail/mutt", xv = "graphics/xv", etc..) AND/OR 2) Each port had a unique PORTNAME and a corresponding unique base directory name. (mutt = /usr/ports/mail/mutt, mutt.ja = /usr/ports/japanese/mutt.ja) Or is there already an easy way that I missed? pkg_info seemed like the logical tool for this information, but I didn't see any options that would solve this problem. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message