diff --git a/debian/changelog b/debian/changelog index f19637b5d..7584561bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -161,6 +161,14 @@ yunohost (11.0.2) testing; urgency=low -- Alexandre Aubin Wed, 19 Jan 2022 20:52:39 +0100 +yunohost (4.4.2.4) stable; urgency=low + + - [fix] bullseye migration: trash pip freeze stderr because it's confusing users ... (e68fc821) + - [fix] bullseye migration: add a check that there's at least 70MB available in /boot ... (02fcbd97) + - [fix] bullseye migration: better detection mechanism for the libc6 / libgcc hell issue (633a1fbf) + + -- Alexandre Aubin Sun, 14 Aug 2022 18:18:13 +0200 + yunohost (4.4.2.3) stable; urgency=low - [fix] bullseye migration: add fix for stupid dnsmasq not picking new init script (origin/dev, origin/HEAD, dev) diff --git a/src/migrations/0021_migrate_to_bullseye.py b/src/migrations/0021_migrate_to_bullseye.py index 5d624c01a..c7474a926 100644 --- a/src/migrations/0021_migrate_to_bullseye.py +++ b/src/migrations/0021_migrate_to_bullseye.py @@ -66,7 +66,7 @@ def _backup_pip_freeze_for_python_app_venvs(): venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/") for venv in venvs: # Generate a requirements file from venv - os.system(f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX}") + os.system(f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null") class MyMigration(Migration): @@ -201,15 +201,8 @@ class MyMigration(Migration): # Another boring fix for the super annoying libc6-dev: Breaks libgcc-8-dev # https://forum.yunohost.org/t/20617 # - if ( - os.system( - "grep -A10 'ynh-deps' /var/lib/dpkg/status | grep -q 'Depends:.*build-essential'" - ) - == 0 - ): - logger.info( - "Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ..." - ) + if os.sytem("dpkg --list | grep '^ii' | grep -q ' libgcc-8-dev '") == 0 and os.system("LC_ALL=C apt policy libgcc-8-dev | grep Candidate | grep -q rpi"): + logger.info("Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ...") os.system("cp /var/lib/dpkg/status /root/dpkg_status.bkp") # This removes the dependency to build-essential from $app-ynh-deps os.system( @@ -386,6 +379,9 @@ class MyMigration(Migration): if free_space_in_directory("/var/") / (1024**3) < 1.0: raise YunohostError("migration_0021_not_enough_free_space") + if free_space_in_directory("/boot/") / (70**3) < 1.0: + raise YunohostError("/boot/ has less than 70MB available. This will probably trigger a crash during the upgrade because a new kernel needs to be installed. Please look for advice on the forum on how to remove old unused kernels to free some space in /boot/.", raw_msg=True) + # Check system is up to date # (but we don't if 'bullseye' is already in the sources.list ... # which means maybe a previous upgrade crashed and we're re-running it)