packages/utils/cache-domains/pre-test.sh
Gerard Ryan 7dd26ee760 cache-domains: added pre-test.sh CI step
Some packages variants have conflicting dependencies with the
base packages and the CI test will fail to install before anything
can be done by the packages to setup the system for install.

This change adds a pre-test.sh that runs before the install so things
like the default libustream variant can be swapped out as shown in the
updated cache-domains.

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2023-05-01 13:38:17 +03:00

24 lines
719 B
Bash
Executable file

#! /bin/sh
set -o errexit
case "${PKG_NAME}" in
cache-domains-openssl)
LIBUSTREAM_DEPS="libustream-openssl libopenssl3"
LIBUSTREAM_DEPS="${LIBUSTREAM_DEPS} libatomic1" # arm_cortex-a15_neon-vfpv4 extra dep
;;
cache-domains-mbedtls)
LIBUSTREAM_DEPS="libustream-mbedtls libmbedtls"
;;
cache-domains-wolfssl)
LIBUSTREAM_DEPS="libustream-wolfssl libwolfssl"
;;
esac
# Replace the current libustream with the one PKG_NAME depends on.
# opkg depends on libustream for https so we need to download the
# replacement first and replace it offline.
opkg download ${LIBUSTREAM_DEPS}
opkg remove 'libustream-*'
opkg install --offline-root / ./*.ipk
rm ./*.ipk