Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
132e591503 | ||
|
|
642b97707d |
@@ -49,11 +49,16 @@ echo "lsphp-apt-upgrade: base image lsphp${PHPVER}=$(dpkg-query -W -f='${Version
|
|||||||
|
|
||||||
# The candidate for lsphpNN must come from the LiteSpeed repo — not "none", and
|
# The candidate for lsphpNN must come from the LiteSpeed repo — not "none", and
|
||||||
# not merely whatever is already installed.
|
# not merely whatever is already installed.
|
||||||
if ! apt-cache madison "lsphp${PHPVER}" | grep -q 'rpms.litespeedtech.com'; then
|
# Read each output into a variable and match in the shell: piping into an
|
||||||
|
# early-exit reader (grep -q, awk ... exit) under pipefail can SIGPIPE the writer
|
||||||
|
# and report "missing" for a package that is there (scripts/tests/lsphp-info-probe.test.sh).
|
||||||
|
MADISON=$(apt-cache madison "lsphp${PHPVER}")
|
||||||
|
if [[ "$MADISON" != *rpms.litespeedtech.com* ]]; then
|
||||||
apt-cache policy "lsphp${PHPVER}" >&2 || true
|
apt-cache policy "lsphp${PHPVER}" >&2 || true
|
||||||
die "the LiteSpeed apt repo does not offer lsphp${PHPVER} (repo missing from sources, or its index is empty)."
|
die "the LiteSpeed apt repo does not offer lsphp${PHPVER} (repo missing from sources, or its index is empty)."
|
||||||
fi
|
fi
|
||||||
CAND=$(apt-cache policy "lsphp${PHPVER}" | awk '/Candidate:/ {print $2; exit}')
|
POLICY=$(apt-cache policy "lsphp${PHPVER}")
|
||||||
|
CAND=$(awk '/Candidate:/ {print $2; exit}' <<<"$POLICY")
|
||||||
echo "lsphp-apt-upgrade: repo candidate lsphp${PHPVER}=${CAND}"
|
echo "lsphp-apt-upgrade: repo candidate lsphp${PHPVER}=${CAND}"
|
||||||
|
|
||||||
if [ "$OS_UPGRADE" = 1 ]; then
|
if [ "$OS_UPGRADE" = 1 ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user