Strange Behavior

Rainer Müller raimue at
Wed Dec 21 03:56:18 PST 2011

On 2011-12-21 01:53 , Jeremy Lavergne wrote:
> Specifically, I have my own repo and macports in sources.conf, with
> my repo first and marked as default. If i run a command against
> specific port names, it uses those portfiles. If I use something like
> "install categorky:kde and maintainer:snc" then it uses macports'
> portfiles instead of mine.

I can reproduce that and have identified the cause. Our algorithm for
calculating the intersection of two pseudo-ports does not respect the
order of the items correctly. Or more generally, it is wrong if a port
name appears more than once in one of the two lists.

This code is in opIntersection in base/src/port/port.tcl [1]. First, it
creates a map from the port names to the list index in $b. If a port
appears multiple times in this list, the last index is stored in the
array. This is clearly wrong as we would want to keep the first entry.



More information about the macports-dev mailing list