[MacPorts] #34784: Add perl5.branches to all p5 ports (adding p5.16 for perl5.16)
Ryan Schmidt
ryandesign at macports.org
Thu Jun 7 18:34:43 PDT 2012
On Jun 7, 2012, at 20:31, Bjarne D Mathiesen wrote:
> 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
No.
>>
>>> 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 ???
Adding a blank line, changing the description, making any change to a port will get it reindexed. But it makes the most sense to put the perl5.branches line into each port so that each port can indicate which perl branches it is compatible with.
>>> 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_
It must not 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 ????
Remove "default", the quotes, and the curly brackets.
perl5.branches 5.8 5.10 5.12 5.14 5.16
More information about the macports-dev
mailing list