ci: Fix cached MacPorts installation management
authorAndres Freund <andres@anarazel.de>
Wed, 27 Nov 2024 16:28:59 +0000 (11:28 -0500)
committerAndres Freund <andres@anarazel.de>
Wed, 27 Nov 2024 16:51:54 +0000 (11:51 -0500)
commit262283d5eec3d582a8645692fede2e8f5e6029bd
treea3a5d199ca3aee2696e673ef6d28e5a99ccdcb88
parent61171a632d10ad7abe1d7ad891176266cc5ef0e1
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 <thomas.munro@gmail.com>
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Suggested-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/au2uqfuy2nf43nwy2txmc5t2emhwij7kzupygto3d2ffgtrdgr%40ckvrlwyflnh2
.cirrus.tasks.yml
src/tools/ci/ci_macports_packages.sh