odd port list installed output
James Berry
jberry at macports.org
Thu Mar 6 06:41:05 PST 2008
On Mar 6, 2008, at 5:02 AM, skip at pobox.com wrote:
> In my previous email I wrote:
>
> If I decide to reinstall, is there some way I can record what
> ports I
> currently have installed then, after the basic install, reinstall
> those
> ports with one command?
>
> So port list installed seems to spit out something almost like what
> I need,
> but I noticed that I seem to have two copies of several ports
> installed. It
> looks like fftw-3, oss-uuid, python24 and python25 are all installed
> twice:
You'll get more joy, I believe, from:
port installed
Note that "port list installed" will "list" each port that is
installed. The list command simply tells you the latest version of the
particular port. So that combination is not particularly useful. A
more useful combination might be "port echo installed", which will
provide much the same information as "port installed".
In either case, you're seeing multiple entries for some ports because
you have installed, but inactive, versions of those ports. To find
only the active versions, you might try:
port echo active
Combine that with a pipe through cut and you'd have a list of all
ports that are currently active. You could save that list away and
then later pass the list to "port install" when you want to reinstall.
Note that this would lose any particular variants you have installed.
port echo active | cut -d ' ' -f 1
Hmm. I think the output of "port echo active" without the cut, would
conveniently give you exactly what you need to replicate your setup
_with_ variants. Almost as if I designed it that way! The only issue
might be if the specified versions were no longer available.
James
>
>
> % port list installed
> bison @2.3 devel/bison
> bzip2 @1.0.4 archivers/bzip2
> db44 @4.4.20 databases/db44
> expat @2.0.1 textproc/expat
> fftw-3 @3.1.2 math/fftw-3
> fftw-3 @3.1.2 math/fftw-3
> freetype @2.3.5 print/freetype
> g95 @0.90 lang/g95
> gdbm @1.8.3 databases/gdbm
> gettext @0.17 devel/gettext
> jasper @1.701.0 graphics/jasper
> jpeg @6b graphics/jpeg
> libiconv @1.12 textproc/libiconv
> libpng @1.2.25 graphics/libpng
> libxml2 @2.6.31 textproc/libxml2
> libxslt @1.1.22 textproc/libxslt
> m4 @1.4.10 devel/m4
> mercurial @0.9.5 devel/mercurial
> ncurses @5.6 devel/ncurses
> ncursesw @5.6 devel/ncursesw
> netpbm @10.26.50 graphics/netpbm
> openssl @0.9.8g devel/openssl
> ossp-uuid @1.6.0 devel/ossp-uuid
> ossp-uuid @1.6.0 devel/ossp-uuid
> postgresql83 @8.3.0 databases/
> postgresql83
> py25-dateutil @1.4 python/py25-dateutil
> py25-tz @2007k python/py25-tz
> python24 @2.4.4 lang/python24
> python24 @2.4.4 lang/python24
> python25 @2.5.2 lang/python25
> python25 @2.5.2 lang/python25
> readline @5.2.007 devel/readline
> tiff @3.8.2 graphics/tiff
> unzip @5.52 archivers/unzip
> wget @1.11 net/wget
> zlib @1.2.3 archivers/zlib
>
> What's up with that? I suppose I should be able to do something
> like this:
>
> port list installed | awk '{print $1}' > currentports
> sudo rm -rf /opt/local
> sudo port install $(cat currentports)
>
> but isn't there some other directory I need to remove? Some sort of
> MacPorts frameworks directory?
>
> --
> Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
More information about the macports-users
mailing list