> On Dec 16, 2015, at 6:20 PM, Mojca Miklavec <mo...@macports.org> wrote:
> 
> Hi,
> 
> On 16 December 2015 at 23:33, Mojca Miklavec wrote:
>> On 16 December 2015 at 21:50, Ryan Schmidt wrote:
>>>> On Dec 16, 2015, at 10:58 AM, Mojca Miklavec wrote:
>>>> 
>>>> Dear Adam,
>>>> 
>>>> On 16 December 2015 at 17:34, Adam Dershowitz wrote:
>>>>> I did a selfupdate.  I uninstalled per5, perl5.16 and perl5.22
>>>>> Next, I installed perl5 +perl5_16
>>>>> Next I installed perl5.16 +universal
>>>>> 
>>>>> Then I did 5.22 and had the problem again:
>>>>> 
>>>>> sudo port install perl5.22 +universal
>>>>> --->  Computing dependencies for perl5.22
>>>>> --->  Fetching archive for perl5.22
>>>>> --->  Attempting to fetch
>>>>> perl5.22-5.22.1_0+universal.darwin_15.i386-x86_64.tbz2 from
>>>>> http://packages.macports.org/perl5.22
>>>>> --->  Attempting to fetch
>>>>> perl5.22-5.22.1_0+universal.darwin_15.i386-x86_64.tbz2 from
>>>>> http://lil.fr.packages.macports.org/perl5.22
>>>>> --->  Attempting to fetch
>>>>> perl5.22-5.22.1_0+universal.darwin_15.i386-x86_64.tbz2 from
>>>>> http://nue.de.packages.macports.org/macports/packages/perl5.22
>>>>> --->  Fetching distfiles for perl5.22
>>>>> --->  Verifying checksums for perl5.22
>>>>> --->  Extracting perl5.22
>>>>> --->  Applying patches to perl5.22
>>>>> --->  Configuring perl5.22
>>>>> --->  Building perl5.22
>>>>> --->  Staging perl5.22 into destroot
>>>>> --->  Installing perl5.22 @5.22.1_0+universal
>>>>> --->  Activating perl5.22 @5.22.1_0+universal
>>>>> Error: org.macports.activate for port perl5.22 returned: Image error:
>>>>> /opt/local/bin/c2ph-5.22 is being used by the active perl5.16 port.  
>>>>> Please
>>>>> deactivate this port first, or use 'port -f activate perl5.22' to force 
>>>>> the
>>>>> activation.
>>>>> Please see the log file for port perl5.22 for details:
>>>>> 
>>>>> /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.22/main.log
>>>>> To report a bug, follow the instructions in the guide:
>>>>>   http://guide.macports.org/#project.tickets
>>>>> Error: Processing of port perl5.22 failed
>>>>> 
>>>>> I did the check that you asked and I see a whole bunch of stuff:
>>>>> 
>>>>> port contents perl5.16 | grep 5.22
>>>>> /opt/local/bin/a2p-5.22
>>>>> /opt/local/bin/c2ph-5.22
>>>> ...
>>>> 
>>>> I need to investigate that. That shouldn't have happened.
>>> 
>>> I don't see the above, but I do see this:
>>> 
>>> 
>>> $ port installed perl5
>>> The following ports are currently installed:
>>>  perl5 @5.22.1_0+perl5_22 (active)
>>> $ port destroot perl5.16 +universal
>>> --->  Computing dependencies for perl5.16
>>> --->  Fetching distfiles for perl5.16
>>> --->  Verifying checksums for perl5.16
>>> --->  Extracting perl5.16
>>> --->  Applying patches to perl5.16
>>> --->  Configuring perl5.16
>>> --->  Building perl5.16
>>> --->  Staging perl5.16 into destroot
>>> $ port log perl5.16 | grep '5\.22'
>>> DEBUG: system: cd 
>>> /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_perl5/perl5.16/work/perl-5.16.3
>>>  && ed - 
>>> /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_perl5/perl5.16/work/perl-5.16.3/config.h
>>>  < /Users/rschmidt/macports/dports/lang/perl5/files/5.22/config.h.ed
>>> 
>>> 
>>> That shouldn't have happened either. The 5.16 and 5.22 versions of 
>>> config.h.ed happen to be the same, but the intention was obviously to use 
>>> the correct version, and that's not happening.
>>> 
>>> Combining multiple ports into a single port is fraught with peril; the php 
>>> port is a rather extreme example, possibly even an antipattern.
>>> 
>>> My initial attempt at understanding the problem goes something like this:
>>> 
>>> In this case, you've got a foreach loop in which you're defining subports. 
>>> However when you define a block inside a subport, such as the 
>>> post-configure block that runs the ed script when the universal variant is 
>>> chosen, the block gets stored verbatim for later use, without any variables 
>>> (such as (${perl5.major}) being expanded. The variables get expanded later, 
>>> when the block is actually used, in this case after the configure phase. By 
>>> that time, the foreach loop is long over, and all of the variables over 
>>> which the foreach loop was looping are now set to their ending values, 
>>> rather than the intended value.
>>> 
>>> However, that doesn't explain why, for me, the same is not happening in the 
>>> post-destroot phase.
>> 
>> Oh, this reminded me on the following thread from the past:
>>    https://lists.macosforge.org/pipermail/macports-dev/2013-July/023498.html
> 
> I was able to reproduce the problem and fix it with
>    https://trac.macports.org/changeset/143653
> but I'm not sure if that is everything that was needed.
> 
> If someone can confirm that (force)uninstalling and reinstalling
> perl5.16 now works as intended and that no leftovers from 5.22 remain
> in "port contents perl5.16", we should revbump the ports (increase the
> third number in perl5.versions_info for perl < 5.22).
> 
> Mojca

That seems to have fixed it.  Thank you.

—Adam

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to