[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Sun Jun 9 06:03:39 PDT 2013


Page "PortfileRecipes" was changed by cal at macports.org
Diff URL: <https://trac.macports.org/wiki/PortfileRecipes?action=diff&version=63>
Revision 63
Comment: deactivate hack: add the pre-activate block, rename variable to a more generic name
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 62)
+++ PortfileRecipes (version: 63)
@@ -477,14 +477,15 @@
 In this particular case, we know `kerberos5` stopped providing `compile_et` in version 1.11. We will add the deactivate hack to `libcomerr`, where it will check whether any `kerberos5` < 1.11 port is active, and if there is, it will deactivate it before activating `libcomerr`. After activating `libcomerr`, MacPorts will then happily continue with the upgrade and install the new (and non-conflicting) version of `kerberos5`. The following block is taken from the `libcomerr` Portfile:
 
 {{{#!tcl
-# both kerberos5 and e2fsprogs previously conflicted because they installed files now provided by libcomerr
-if {![catch {set installed [lindex [registry_active kerberos5] 0]}]} {
-    set krb_version [lindex $installed 1]
-    if {[vercmp $krb_version 1.11] < 0} {
-        # kerberos5 used to install some files now provided by libcomerr in versions < 1.11
-        registry_deactivate_composite kerberos5 "" [list ports_nodepcheck 1]
+pre-activate {
+    # both kerberos5 and e2fsprogs previously conflicted because they installed files now provided by libcomerr
+    if {![catch {set installed [lindex [registry_active kerberos5] 0]}]} {
+        set _version [lindex $installed 1]
+        if {[vercmp $_version 1.11] < 0} {
+            # kerberos5 used to install some files now provided by libcomerr in versions < 1.11
+            registry_deactivate_composite kerberos5 "" [list ports_nodepcheck 1]
+        }
     }
-}
 }}}
 
 * `registry_active` returns a list containing information about active ports. Given a particular name, only one active port can match, so the returning list has at most one element, which we save as `installed`. (If we had not provided an argument, the list would have had one element for every active port.)
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/PortfileRecipes>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'PortfileRecipes' page.
If it was not you, please report to .


More information about the macports-changes mailing list