Changes between Version 53 and Version 54 of PortfileRecipes


Ignore:
Timestamp:
Mar 6, 2013, 12:50:55 AM (11 years ago)
Author:
neverpanic (Clemens Lang)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PortfileRecipes

    v53 v54  
    483483* Because `registry_active` will raise an error if the port requested is not active, we need to wrap it in a catch statement. If catch returns 0 (i.e., no error occured), we know the port in question is active.
    484484* In the example above, we retrieve the version of `kerberos5` (from index 1) and check using `vercmp` whether it is lower than 1.11. If it is, we need to deactivate the `kerberos5` port. Your case might differ here, because you might have to check revision and/or epoch.
    485 * To do that, we can use `registry_deactivate_composite` (and you can probably guess that this is an alias, too, and where you can find it). `registry_deactivate_composite $name "" $options` is a shorthand for `registry_deactivate $name "" "" 0 $options` and will deactivate the port indicated by `$name`. The second argument is a version number, which we can leave empty in this case. If we would normally try to deactivate `kerberos5` it might fail, because other ports might still depend on `kerberos5` being present. Since we know that it will be reinstalled soon anyway, we can just force deactivation without paying respect to the dependent ports (which we do by passing `[list ports_nodepcheck 1]` as `$options` argument.
     485* To deactivate the offending port, we can use `registry_deactivate_composite` (and you can probably guess that this is an alias, too, and where you can find it). `registry_deactivate_composite $name "" $options` is a shorthand for `registry_deactivate $name "" "" 0 $options` and will deactivate the port indicated by `$name`. The second argument is a version number, which we can leave empty in this case. If we would normally try to deactivate `kerberos5` it might fail, because other ports might still depend on `kerberos5` being present. Since we know that it will be reinstalled soon anyway, we can just force deactivation without paying respect to the dependent ports (which we do by passing `[list ports_nodepcheck 1]` as `$options` argument.