From: Jason Ish Date: Fri, 24 Mar 2017 19:59:39 +0000 (-0600) Subject: travis: macos: unlink all deps, then relink X-Git-Tag: suricata-4.0.0-beta1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a7c5a01a1a6b2023e14d153f4d787e9e5ad68ee;p=thirdparty%2Fsuricata.git travis: macos: unlink all deps, then relink Kind of ugly, but first unlink all dependencies then install. The deps that don't get an upgrade will remain unlinked, so relink all dependencies as relinking an already linked dep does not error out. --- diff --git a/.travis.yml b/.travis.yml index 168454fc22..5af6abf234 100644 --- a/.travis.yml +++ b/.travis.yml @@ -127,12 +127,29 @@ before_install: if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update + # Unlink and install each dependency to avoid errors where a + # formula might already be installed but is not the current + # version. + packages="pkg-config libmagic libyaml nss nspr jansson libnet lua pcre hiredis" + for package in $packages; do + if brew ls $package --versions > /dev/null; then + brew unlink $package + fi + done + + # Now install. + brew install $packages + + # Now relink, becuase if a newer version of a package wasn't + # installed above, it will remain unlinked. + brew link $packages + # Unlink pcre in case its already installed. - brew unlink pcre || true - brew unlink pkg-config || true + # brew unlink pcre || true + # brew unlink pkg-config || true - brew install pkg-config libmagic libyaml nss nspr jansson libnet lua \ - pcre hiredis + # brew install pkg-config libmagic libyaml nss nspr jansson libnet lua \ + # pcre hiredis fi - ./qa/travis-libhtp.sh