"replaced by" advice

David Strubbe dstrubbe at gmail.com
Wed Jun 26 07:59:36 PDT 2013


Hi all,

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130626/6c63e224/attachment.html>


More information about the macports-dev mailing list