Skip to content

Commit 0eb3671

Browse files
dschogitster
authored andcommitted
ci(osx): use new location of the perforce cask
The Azure Pipelines builds are failing for macOS due to a change in the location of the perforce cask. The command outputs the following error: + brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. So let's try to call `brew cask install perforce` first (which is what that error message suggests, in a most round-about way). Prior to 672f51c we used to install the 'perforce' package with 'brew install perforce' (note: no 'cask' in there). The justification for 672f51c was that the command 'brew install perforce' simply stopped working, after Homebrew folks decided that it's better to move the 'perforce' package to a "cask". Their justification for this move was that 'brew install perforce' "can fail due to a checksum mismatch ...", and casks can be installed without checksum verification. And indeed, both 'brew cask install perforce' and 'brew install caskroom/cask/perforce' printed something along the lines of: ==> No checksum defined for Cask perforce, skipping verification It is unclear why 672f51c used 'brew install caskroom/cask/perforce' instead of 'brew cask install perforce'. It appears (by running both commands on old Travis CI macOS images) that both commands worked all the same already back then. In any case, as the error message at the top of this commit message shows, 'brew install caskroom/cask/perforce' has stopped working recently, but 'brew cask install perforce' still does, so let's use that. CI servers are typically fresh virtual machines, but not always. To accommodate for that, let's try harder if `brew cask install perforce` fails, by specifically pulling the latest `master` of the `homebrew-cask` repository. This will still fail, of course, when `homebrew-cask` falls behind Perforce's release schedule. But once it is updated, we can now simply re-run the failed jobs and they will pick up that update. As for updating `homebrew-cask`: the beginnings of automating this in https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary will be finished once the next Perforce upgrade comes around. Helped-by: SZEDER Gábor <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 108b97d commit 0eb3671

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ci/install-dependencies.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ osx-clang|osx-gcc)
4040
test -z "$BREW_INSTALL_PACKAGES" ||
4141
brew install $BREW_INSTALL_PACKAGES
4242
brew link --force gettext
43+
brew cask install perforce || {
44+
# Update the definitions and try again
45+
git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull &&
46+
brew cask install perforce
47+
} ||
4348
brew install caskroom/cask/perforce
4449
case "$jobname" in
4550
osx-gcc)

0 commit comments

Comments
 (0)