Homebrew fails because an automake update is an error?

Hi Everyone,

Our iOS jobs are failing due to Homebrew. The failures seem relatively recent, within the last 2 or 3 days. The failures seem to have something to do with Homebrew being older then 30 days so an update is required.

A job can be found here, and the error message is:

Updating tools
Installing tools
Warning: autoconf 2.69 is already installed and up-to-date
To reinstall 2.69, run `brew reinstall autoconf`
Warning: libtool 2.4.6_1 is already installed and up-to-date
To reinstall 2.4.6_1, run `brew reinstall libtool`
Warning: pkg-config 0.29.2 is already installed and up-to-date
To reinstall 0.29.2, run `brew reinstall pkg-config`
Error: automake 1.16.1_1 is already installed
To upgrade to 1.16.2, run `brew upgrade automake`.

The “Updating Tools” and “Installing Tools” messages are from this script:

# This step should install tools needed for all packages - OpenSSL and LDNS
echo "Updating tools"
brew update 1>/dev/null
echo "Installing tools"
brew install autoconf automake libtool pkg-config curl perl 1>/dev/null

Does anyone know how to tell Homebrew to stop treating upgrades as an error?

I don’t believe you can.

In the similar vein, brew upgrade will exit with nonzero if you ask it to upgrade and you already have the most up-to-date version.

I think you are expected to check before with some combination of commands, such as brew outdated.

If you would like to pursue it further, I suggest taking it to

1 Like

Thanks @BanzaiMan,

Let me add a || true to the command:

echo "Updating tools"
brew update 1>/dev/null || true
echo "Installing tools"
brew install autoconf automake libtool pkg-config curl perl 1>/dev/null || true