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

Tabitha McNerney tabithamc at gmail.com
Mon Jun 2 19:35:25 PDT 2008


On Sat, May 31, 2008 at 5:22 PM, Rainer Müller <raimue at macports.org> wrote:

> Tabitha McNerney wrote:
>
>> On 5/30/08, Rainer Müller <raimue at macports.org> wrote:
>>   $ 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?
>>
>
> Exactly. Or the port has been installed before, but a new PortIndex (and
> Portfile) was synced later which adds a new dependency.
>
> > [...]
>
>> 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?
>>
>
> Hmmmmmm.... *taking a deep thought*
> Aaaah, port info!
>
> Use like this:
> $ port info --depends_build --depends_lib --depends_run postfix +ldap
>
> You can also add --line to compress the output to one line only. You can
> hide the label in front of the line and error output by using port -q info.
>
> As variants are also parsed from the @version notation, you can simply call
> this as:
> $ port -q info --line --depends_build --depends_lib --depends_run \ postfix
> @2.4.6_0+ldap+pcre+sasl+tls
>
> But if you only need the set of variants you have currently installed:
> $ port -q info --line --depends_build --depends_lib --depends_run \ postfix
> and installed
>
> And if you need this for multiple installed ports, this is also possible.
> You can use port echo to check to what such a port list expands:
> $ port echo \( postfix openldap \) and installed
>
> "or" is the default logical operator in such lists, so you do not need to
> write it explicitely.
>
> There is still a little bug though, port -q info --depends_build postfix
> outputs the usual info as postfix does not have dependencies. I am going to
> have a look into this.
>
>
> These are awesome features of port, don't you think? I hope you didn't
> invest too much work into writing your own parser for Portfiles...


Rainier, very awesome indeed! Like Ryan, I also was not aware of some of
these great features. You really saved the day because I took part of the
weekend off and then now (a few days later, thanks for your prompt reply to
my email a few days ago) I didn't yet write a Portifle parser so now I'm
really glad I don't have to write one -- I can easily use the port
command-line output especially with all those goodies (such as the
--depends_build, etc.) options!


> But I have to admit I would have never gotten the idea to use port info if
> I would not have made other changes to port/port.tcl today. :-)


I didn't have a chance yet to look at the changes in Trac but I'll take a
look. I'm glad this triggered some additional thoughts and thank you for
your modifications! Its great that we can run MacPorts on a variety of
machines that can run Mac OS X or OS X Server (whether its a MacBook or an
Xserve). The Xserves are pretty heavy-duty systems and and its great to know
that we can build a robust infrastructure of open source programs all glued
together with MacPorts!

All my best,

Tabitha


> Maybe we should really make port deps aware of variants.
>
> Rainer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080602/4fba31e1/attachment.htm 


More information about the macports-users mailing list