On 2013-6-27 10:00 , Ryan Schmidt wrote:
> 
> On Jun 26, 2013, at 09:59, David Strubbe <[email protected]> wrote:
> 
>> The advice for replacing one port by another at 
>> http://guide.macports.org/#development.replaced_by involves inserting this 
>> code:
>> pre-configure {
>>     ui_error "Please do not install this port since it has been replaced by 
>> 'skrooge'."
>>     return -code error
>> }
>>
>> If you have the port installed, when it gets replaced, it is deactivated and 
>> the new port is installed. But if you try to activate the old port later, 
>> not realizing it was replaced, this pre-configure error is not triggered, 
>> since no configure occurs. Instead, you may get errors on activation, with 
>> no explanation about the port replacement. That is what I experienced below. 
>> Could this ui_error block be put in a later stage too, e.g. pre-activate, to 
>> make this clear? Or maybe have the obsolete port marked as conflicting. 
>> Otherwise, one has to examine the Portfile to understand why you can't 
>> activate the port.
>>
>> David
>>
>> $ sudo port activate py27-gtk @2.22.0_3+quartz
>> Password:
>> --->  Computing dependencies for py27-gtk
>> --->  Activating py27-gtk @2.22.0_3+quartz
>> Error: org.macports.activate for port py27-gtk returned: Image error: 
>> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pygtk-codegen-2.0
>>  is being used by the active py27-pygtk port.  Please deactivate this port 
>> first, or use 'port -f activate py27-gtk' to force the activation.
>> Please see the log file for port py27-gtk for details:
>>     
>> /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_py27-gtk_2.22.0_3+quartz/py27-gtk/main.log
>> Warning: Failed to execute portfile from registry for py27-gtk 
>> @2.22.0_3+quartz
>> --->  Activating py27-gtk @2.22.0_3+quartz
>> Error: port activate failed: Image error: 
>> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pygtk-codegen-2.0
>>  is being used by the active py27-pygtk port.  Please deactivate this port 
>> first, or use 'port -f activate py27-gtk' to force the activation.
> 
> I can't think of any good way to prevent this.
> 
> The py27-gtk @2.22.0_3+quartz you have installed does not contain any 
> statements about having been replaced. It's the *next* version of the port 
> (the one that, thanks to the above pre-configure block, cannot be installed) 
> that contains those statements.

Yeah, it would have to be done in base.

- Josh
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to