[100449] users/raimue/ports/sysutils/collectd

Ryan Schmidt ryandesign at macports.org
Wed Dec 12 12:07:39 PST 2012


On Dec 12, 2012, at 12:01, Rainer Müller wrote:

>> Something wrong... deleting and then appending the same dependency?
> 
> Hm, right. This is the code that was originally written by Clemens, so
> probably he can clarify this. I guess it is written this way to avoid
> adding a dependency twice.

Oh I see, because the port has a metric ton of variants and some of them add the same dependency.

For that matter: is the apache variant correct? It says it adds "Apache httpd statistics" but it adds a dependency only on the curl port.

My inclination would be to not worry about duplicate dependencies. They shouldn't cause trouble. Er, except I see that "port lint" does check for them, as it should.

If feeling pedantic, one could do e.g.:

if {[variant_isset rrdtool] || [variant_isset rrdcached]} {
    depends_lib-append port:rrdtool
}


> Although there is a valid point: should we check for duplicates in base
> when using depends_*-append? Are there other options we treat as a set
> rather than a string or list?

We could filter out duplicates in base. On the other hand, that (and the mechanism already employed by collectd) could interfere with another idea I had, which was that base should warn if you try to -delete something (from depends_lib or configure.args or build.env or any other option) that's not there; I thought this might help to catch errors early. I have a feeling this type of check might be too complicated for "port lint" to be able to do.



More information about the macports-dev mailing list