]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
travis: unlink python package before upgrading brew packages
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 15 Mar 2018 13:05:55 +0000 (13:05 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 15 Mar 2018 14:09:52 +0000 (14:09 +0000)
The 'brew upgrade' command is pulling in the python2 package which
promptly fails due to clashing symlinks installed by the new python
package (which is python3 based):

==> Pouring python@2-2.7.14_3.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-2
Target /usr/local/bin/2to3-2
is a symlink belonging to python. You can unlink it:
  brew unlink python
To force the link and overwrite all conflicting files:
  brew link --overwrite python@2
To list all files that would be deleted:
  brew link --overwrite --dry-run python@2

By running 'brew unlink python' we can get rid of the python3 links that
we didn't want in the first place and avoid this error.

This is the working fix for what we previously attempted todo in:

  commit c9c9fc90ce77ac4a3079c99f42b621937b464700
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Mon Mar 5 10:13:12 2018 +0000

    travis: force install of python2 into $PATH on macOS

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
.travis.yml

index 9801981eca3340ebc4c7fca8e612c480dd7c3072..d1f09f9cade71f5c2f854197ccb74d993133dabf 100644 (file)
@@ -16,9 +16,9 @@ matrix:
       os: osx
       before_install:
         - brew update
+        - brew unlink python
         - brew upgrade
         - brew install rpcgen yajl xz
-        - brew link --force python@2
       script:
         # We can't run make distcheck/syntax-check because they
         # fail on macOS, but doing 'install' and 'dist' gives us