scope of "local" PortGroup definition files

Ryan Schmidt ryandesign at
Fri Jan 9 13:44:35 PST 2015

On Jan 9, 2015, at 2:36 PM, René J.V. Bertin wrote:

> On Friday January 09 2015 13:11:08 Ryan Schmidt wrote:
>> I've committed this fix to the portgroup in r131321.
> Great, glad to have been of help, if I knew this stood a chance for direct inclusion I'd have attached a patch!

Sometimes I commit things. Sometimes I have to be reminded many times before that happens. :)

>> Note that you need to "global" options (like os.platform) to use them in a proc.
> `global os` or `global os.platform` ?

global os.platform

Although "." looks like a namespace separator between "os" and "platform", that's all it is: something that looks like that. In reality, "." is just another valid character you can use in variable names. So in MacPorts there is no variable called "os". But there is a variable (an option, actually, MacPorts' special lazy-evaluated global variables) called "os.platform".

From :

"A variable name that is enclosed in braces may be composed of any characters except the right brace. When not enclosed in braces, a variable name must be composed only of letters, digits, underscore, the empty string, or namespace separators."

More information about the macports-dev mailing list