ci: Fix cached MacPorts installation management
authorAndres Freund <[email protected]>
Wed, 27 Nov 2024 16:30:08 +0000 (11:30 -0500)
committerAndres Freund <[email protected]>
Wed, 27 Nov 2024 16:30:08 +0000 (11:30 -0500)
commitc26831e7362487b4f2c606e1223207baa1d495cb
tree09ab3d2a7cf7cd8726bf33524132281a0fba3b9e
parent1cf646957135d1200c2b7765e6446fb91bb47d86
ci: Fix cached MacPorts installation management

1.  The error reporting of "port setrequested list-of-packages..."
changed, hiding errors we were relying on to know if all packages in our
list were already installed.  Use a loop instead.

2.  The cached MacPorts installation was shared between PostgreSQL
major branches, though each branch wanted different packages.  Add the
list of packages to cache key, so that different branches, when tested
in one github account/repo such as postgres/postgres, stop fighting with
each other, adding and removing packages.

Back-patch to 15 where CI began.

Author: Thomas Munro <[email protected]>
Author: Nazir Bilal Yavuz <[email protected]>
Suggested-by: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/au2uqfuy2nf43nwy2txmc5t2emhwij7kzupygto3d2ffgtrdgr%40ckvrlwyflnh2
.cirrus.tasks.yml
src/tools/ci/ci_macports_packages.sh