diff --git a/src/_port b/src/_port index 7ac5a6e..3a6eaf2 100644 --- a/src/_port +++ b/src/_port @@ -135,8 +135,14 @@ _port() { '-y[Perform a dry run.]' \ '-t[Enable trace mode debug facilities on platforms that support it (Mac OS X).]' \ "1:Port actions:(($actions))" \ - '*:extra:_port_dispatch' \ + '*:extra:->extra' \ && return 0 + + case "$state" in + extra) + _port_dispatch + ;; + esac } _port_dispatch() { @@ -219,16 +225,8 @@ _port_select() { } _port_caching_policy() { - local reg_time comp_time check_file - case "${1##*/}" in - PORT_INSTALLED_PACKAGES) - check_file=$port_prefix/var/macports/registry/registry.db - ;; - PORT_AVAILABLE_PACKAGES) - check_file=${$(port dir MacPorts)%/*/*}/PortIndex - ;; - esac - reg_time=$(stat -c '%Z' $check_file) + local reg_time comp_time + reg_time=$(stat -c '%Z' $port_prefix/var/macports/registry/registry.db) comp_time=$(stat -c '%Z' $1) return $(( reg_time < comp_time )) }