Re: [PATCH v3 2/4] ci: avoid brew for installing perforce

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Carlo,

On Sat, 23 Apr 2022, Carlo Marcelo Arenas Belón wrote:

> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 41e9290fbdd..9da03350d09 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -37,13 +37,14 @@ macos-latest)
>  	test -z "$BREW_INSTALL_PACKAGES" ||
>  	brew install $BREW_INSTALL_PACKAGES
>  	brew link --force gettext
> -	brew install --cask --no-quarantine perforce || {
> -		# Update the definitions and try again
> -		cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
> -		git -C "$cask_repo" pull --no-stat --ff-only &&
> -		brew install --cask --no-quarantine perforce
> -	} ||
> -	brew install homebrew/cask/perforce
> +	mkdir -p $HOME/bin
> +	(
> +		cd $HOME/bin
> +		wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz"; &&

I vaguely recall that Gábor Szeder attempted something similar, but I
_think_ that ultimately there were too many moving parts in that URL that
we did not want to hardcode.

For example, when opening a PR against `maint` or an even older topic
branch, we are stuck with the exact code in that revision that obtains
the perforce package. But since that server is outside our control, it can
very well evolve to a state that is not amenable to hard-coding such a
URL.

While I don't think that we can solve this fully, I would prefer to keep
the existing `brew install` calls but fall back to downloading from a
hard-coded URL. That still would have the shortcoming of hard-coded
`r21.2` and `1015`, but it should fail less often than the proposed patch.

For the record, the recent problems stem from the fact that the package
was cached on GitHub's build agents (I guess to avoid many identical
downloads), and the cached package did not match what was recorded in the
updated package definition. Which means that those `brew` errors are only
transient, until a new VM image is built that caches the then-current
perforce package.

Ciao,
Dscho

> +		tar -xf helix-core-server.tgz
> +	)
> +	PATH="$PATH:${HOME}/bin"
> +	export PATH
>
>  	if test -n "$CC_PACKAGE"
>  	then
> --
> 2.36.0.266.g59f845bde02
>
>

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux