[152507] contrib/mp-buildbot/mpbb-cleanup

Clemens Lang cal at macports.org
Mon Sep 12 01:41:55 PDT 2016


Hi,

On Sun, Sep 11, 2016 at 11:47:58AM -0700, raimue at macports.org wrote:
> Revision: 152507
>           https://trac.macports.org/changeset/152507
> Author:   raimue at macports.org
> Date:     2016-09-11 11:47:58 -0700 (Sun, 11 Sep 2016)
> Log Message:
> -----------
> buildbot: skip cleanup if port is not installed
> [...]
> Modified: contrib/mp-buildbot/mpbb-cleanup
> ===================================================================
> --- contrib/mp-buildbot/mpbb-cleanup	2016-09-11 18:41:15 UTC (rev 152506)
> +++ contrib/mp-buildbot/mpbb-cleanup	2016-09-11 18:47:58 UTC (rev 152507)
> @@ -10,6 +10,15 @@
>  }
>  
>  cleanup() {
> +    # if this is the very first build, selfupdate did not install port yet
> +    # $option_prefix is set by mpbb
> +    # shellcheck disable=SC2154
> +    if [ ! -e "${option_prefix}/bin/port" ]; then
> +        echo "---> Skipping cleanup"
> +        echo "port not installed at ${option_prefix}/bin/port"
> +        return
> +    fi
> +
>      echo "----> Deactivating ports"
>      # $option_prefix is set by mpbb
>      # shellcheck disable=SC2154

If $prefix/bin/port does not exist, $prefix/bin/port-tclsh will not
exist either, and the invocation of "tools/uninstall-old-ports.tcl"
below will fail as well.

-- 
Clemens


More information about the macports-dev mailing list