Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 17:19:15 -0700
From:      "Jason R. Mastaler" <jason@mastaler.com>
To:        freebsd-ports@freebsd.org
Subject:   problem manipulating ports programatically
Message-ID:  <00112117191502.01897@nightshade>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00112117191502.01897>