Make sure to unhold openssl before downgrade...

This commit is contained in:
Alexandre Aubin 2020-08-24 00:21:51 +02:00
parent d55fec4044
commit cb880ede9f

View file

@ -93,6 +93,7 @@ class MyMigration(Migration):
# Vanilla debian version looks like: 1.1.1d-0+deb10u3+rpt1 # Vanilla debian version looks like: 1.1.1d-0+deb10u3+rpt1
# Sury version looks like: 1.1.1g-1+0~20200421.17+debian9~1.gbpf6902f # Sury version looks like: 1.1.1g-1+0~20200421.17+debian9~1.gbpf6902f
if "gbp" in openssl_version: if "gbp" in openssl_version:
check_output("apt-mark unhold openssl")
new_version = check_output("LC_ALL=C apt policy openssl 2>/dev/null | tr -d '*' | grep '^\\s*1.1.1' | grep -v gbp | head -n 1 | awk '{print $1}'").strip() new_version = check_output("LC_ALL=C apt policy openssl 2>/dev/null | tr -d '*' | grep '^\\s*1.1.1' | grep -v gbp | head -n 1 | awk '{print $1}'").strip()
if new_version: if new_version:
logger.info("Downgrading openssl version from %s to %s ..." % (openssl_version, new_version)) logger.info("Downgrading openssl version from %s to %s ..." % (openssl_version, new_version))