Some ports have several versions installed, for example:

sqlite3 @3.7.17_0
sqlite3 @3.8.0_0 (active)

How do I get dependencies per each of them?

$ port deps sqlite3@3.7.17_0
Full Name: sqlite3 @
Library Dependencies: libedit
$ port echo depof:sqlite3 and version:3.7.17_0
$ port echo depof:sqlite3 and version:@3.7.17_0

No success at the moment.

P.S.: wanted the dependencies tag for this question.

  • What are you trying to do with this info?
    – mmmmmm
    Oct 2 '13 at 6:08
  • @Mark, I want to make a simple Ruby script to draw me a dependencies tree to find if I can deinstall smth useless for me.
    – Nakilon
    Oct 3 '13 at 1:26

That looks like either a bug or a limitation with the deps command to me. A quick look in the MacPorts Guide, and port help deps doesn't specify any such limitation, though that's not very conclusive.

I'm not sure if you should be able to see dependencies for different versions, though I can definitely see different dependencies for different variants.

I have two versions of boost installed (note the different python variants, but same version):

% port installed boost
The following ports are currently installed:
  boost @1.54.0_0+no_single+no_static+python27 (active)
  boost @1.54.0_0+no_single+no_static+python33

And I can check their dependencies independently by referencing them as portname@version+variants (version & variants being optional):

% port deps boost @1.54.0_0+no_single+no_static+python27
Full Name: boost @1.54.0_0+no_single+no_static+python27
Library Dependencies: zlib, expat, bzip2, libiconv, icu, python27

% port deps boost @1.54.0_0+no_single+no_static+python33
Full Name: boost @1.54.0_0+no_single+no_static+python33
Library Dependencies: zlib, expat, bzip2, libiconv, icu, python33

But I also have two versions of glib2 and pango installed at present:

% port installed glib2 pango
The following ports are currently installed:
  glib2 @2.36.4_0
  glib2 @2.38.0_0 (active)
  pango @1.34.1_1+x11
  pango @1.36.0_0+x11 (active)

Yet, likewise, cannot see the deps of the inactive versions:

% port deps glib2 @2.36.4_0
Full Name: glib2 @2.38.0_1
Extract Dependencies: xz
Build Dependencies:   libxml2
Library Dependencies: gettext, libiconv, zlib, libffi, perl5

% port deps pango @1.34.1_1+x11
Full Name: pango @1.36.0_0+x11
Extract Dependencies: xz
Build Dependencies:   pkgconfig
Library Dependencies: glib2, cairo, gobject-introspection, harfbuzz, Xft2

Both show the newer (active) version rather than the older one, even with the --index argument to deps.


You can't.
Macports dependencies are between ports and not versions.

Only one port used at a time that is the active one Variants and versions of a port can depend on different ports. But different ports and/or variants cannot depend on variants see the Macports FAQ

  • There seems to be some difference for versions and variants, so it may not be quite that simple...? I'm able to see different dependencies for two different installations of boost (same version, different variants). See my answer for specifics. Oct 2 '13 at 6:10
  • I think the variants can depend on different librariess/binaries etc but they cannot depend on a specific variant of a library
    – mmmmmm
    Oct 2 '13 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .