[MacPorts] #34784: Add perl5.branches to all p5 ports (adding p5.16 for perl5.16)

Bjarne D Mathiesen macintosh at mathiesen.info
Thu Jun 7 18:31:16 PDT 2012


Ryan Schmidt wrote:
> 
> On Jun 7, 2012, at 17:21, Bjarne D Mathiesen wrote:
> 
>> MacPorts wrote:
>>> #34784: Add perl5.branches to all p5 ports (adding p5.16 for perl5.16)
>>> -------------------------------------+--------------------------------------
>>> Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
>>>     Type:  enhancement              |      Status:  new                                  
>>> Priority:  Normal                   |   Milestone:                                       
>>> Component:  ports                    |     Version:  2.1.1                                
>>> Keywords:                           |        Port:                                       
>>> -------------------------------------+--------------------------------------
>>>
>>> Comment(by ryandesign@…):
>>>
>>> Replying to [ticket:34784 ryandesign@…]:
>>>> In r93584 the perl5 portgroup was updated to add "5.16" to
>>> perl5.branches
>>>
>>> I reverted this in r94024.
>>>
>>>> but this is not the correct way to do this.
>>>
>>> The reason this does not work is that the p5.16 subports don't get added
>>> to the portindex until the ports are reindexed. This only happens when a
>>> port is updated. So ever since r93584 this means when a port is updated,
>>> that has dependencies that haven't been updated since that change, the
>>> buildbot will fail to build the p5.16 subport, because its dependencies
>>> don't seem to have p5.16 subports yet.
>>>
>>>> Instead, every p5 port needs the perl5.branches line added to it
>>>
>>> Once this is done, the default for perl5.branches needs to be removed from
>>> the perl5 portgroup.
>>>
>>
>> Is it enough to just move that line around ???
> 
> I don't understand... move what line from where to where?

	default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
from the _PortGroup_ to the _p5-*_ ports

> 
>> Isn't it necessary to rev-bump the p5-* ports too ???
> 
> Not as far as I know. Simply changing a port, in any way, should cause the port to be reindexed.

So, if we keep the current structure & _don't_ move the perl5.branches,
rev-bumping the p5-* ports whenever a new branch in added/removed ought
to cause a re-indexing too ???

> 
> 
>> This is the piece of code in question :
>> # portfile configuration options
>> # perl5.branches: the major perl version supported by this module. A
>> #   subport will be created for each. e.g. p5.12-foo, p5.10-foo, ...
>> # perl5.default_branch: the branch used when you request p5-foo
>> options perl5.default_branch perl5.branches
>> default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
>> default perl5.default_branch {[perl5_get_default_branch]}
>> proc perl5_get_default_branch {} {
>>    global prefix
>>    # use whatever ${prefix}/bin/perl5 was chosen, and if none, fall
>> back to 5.12
>>    if {![catch {set val [lindex [split [exec ${prefix}/bin/perl5
>> -V:version] {'}] 1]}]} {
>>        return [join [lrange [split $val .] 0 1] .]
>>    } else {
>>        return 5.12
>>    }
>> }
>>
>> Q : in any given p5-* port, should the line be
>> default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
>> set perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
> 
> In any given p5 port, the line should be:
> 
> perl5.branches 5.8 5.10 5.12 5.14 5.16

but does it have to start with _default_ -or- _set_

> 
> Or whatever subset of those branches that specific p5 port actually supports.
> 
> The way the perl5 portgroup is currently written, the perl5.branches line must appear before the perl5.setup line. I think it would be nice if it could appear after that line, but that would require changes to the perl5 portgroup, possibly large changes, such as the large changes I had to make to turn the php 1.0 portgroup into the php 1.1 portgroup.

so ... if we had this:

PortGroup           perl5 1.0
default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
perl5.setup         YAML 0.73

that would satisfy all the requirements ????

-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3


More information about the macports-dev mailing list