Ports and their dependencies (run deps and also versioning questions)

Tabitha McNerney tabithamc at gmail.com
Sat May 31 09:24:44 PDT 2008


Rainier and friends ...

On 5/30/08, Rainer Müller <raimue at macports.org> wrote:

[SNIP]

   $ port deps Xft2 @2.1.12_0
>>
>
> @version is ignored for port deps.
>
> port deps takes infos from PortIndex only, so it may not always be
> accurate.


Meaning, if a port has changed (or a new port has been added) but the
PortIndex has not been updated?


[...]
>
>> Is this purely a matter of the active port (Xft2) will only successfully
>> install (and capable of being activated) based on whatever versions are of
>> its (library, build, run) dependencies at the moment it is installed?
>>
>
> Dependencies in MacPorts are not on a specific version of a port, just on a
> port being installed and active - regardless of variants and version.


Regarding dependencies, I ran into an interesting situation today. I have
the postfix port installed with several variants (such as pcre, tls, sasl
and ldap). However, if one asks for the postfix port's dependencies like
this:

$ port installed postfix
> The following ports are currently installed:
>   postfix @2.4.6_0+ldap+pcre+sasl+tls (active)
>

then:

$ port deps postfix
>

yields:

postfix has no dependencies
>

Oh bummer. I would like to know what the additional dependencies are for the
postfix port with the variants I have for postfix. But since version and
variant are ignored by "port deps ..." then the only way to retrieve this
information is to parse the following:

1.) the output of $ port installed postfix which as we see above is: postfix
@2.4.6_0+ldap+pcre+sasl+tls (active)  ... we can parse the variants by
looking at what comes after the "+" signs, ok not difficult

2.) parse the postfix Portfile and look up the variant structures, like this
one for ldap:

variant ldap description "add ldap support via openldap" {
>     depends_lib-append  port:openldap
>     set CCARGS      [concat ${CCARGS} -DHAS_LDAP]
>     set AUXLIBS     [concat ${AUXLIBS} -lldap -llber]
> }
>

Here we can see "variant ldap" has a depends_lib-append of port:openldap

And then we can check the installed version of openldap:

$ port installed openldap
>

-->

openldap @2.3.35_0 (active)
>

So this would really be the only way (with a machine and parsing software)
to automatically confirm the probable version information of the ldap
(openldap port) variant for the library dependency when ldap is a variant
tacked on to postfix?

Has anyone else done anything like this? It would be nice to have an
automated system for keeping track of things (like an audit system) since
MacPorts can be complex as it grows.

Thanks,

T.M.

Rainer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080531/ecd25cab/attachment.htm 


More information about the macports-users mailing list