diff --git a/debian/changelog b/debian/changelog index 5405aba74..aac543676 100644 --- a/debian/changelog +++ b/debian/changelog @@ -168,7 +168,14 @@ yunohost (11.0.2) testing; urgency=low -- Alexandre Aubin Wed, 19 Jan 2022 20:52:39 +0100 -yunohost (4.4.2.5) stable; urgency=low +yunohost (4.4.2.7) stable; urgency=low + + - upgrades: ignore boring insserv warnings during apt commands (87f0eff9) + - bullseye migration: higher treshold for low space detection in /boot/ because some people still experience the issue on 4.4.2.6 (d283c900) + + -- Alexandre Aubin Wed, 17 Aug 2022 01:21:36 +0200 + +yunohost (4.4.2.6) 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) diff --git a/src/migrations/0021_migrate_to_bullseye.py b/src/migrations/0021_migrate_to_bullseye.py index a110d801d..44d88b5d4 100644 --- a/src/migrations/0021_migrate_to_bullseye.py +++ b/src/migrations/0021_migrate_to_bullseye.py @@ -201,18 +201,18 @@ 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("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"): + if os.system("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") == 0: 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( "perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status" ) - self.apt("build-essential", verb="remove") + self.apt_install("build-essential-") # Note the '-' suffix to mean that we actually want to remove the packages os.system( "LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes" ) - self.apt("gcc-8 libgcc-8-dev", verb="remove") + self.apt_install("gcc-8- libgcc-8-dev-") # Note the '-' suffix to mean that we actually want to remove the packages # # Main upgrade @@ -379,8 +379,8 @@ 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) + if free_space_in_directory("/boot/") / (120**3) < 1.0: + raise YunohostError("/boot/ has less than 120MB 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 up 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 ... @@ -495,9 +495,6 @@ class MyMigration(Migration): os.system(f"apt-mark unhold {package}") def apt_install(self, cmd): - return self.apt(cmd, verb="install") - - def apt(self, cmd, verb="install"): def is_relevant(line): return "Reading database ..." not in line.rstrip() @@ -511,7 +508,7 @@ class MyMigration(Migration): ) cmd = ( - f"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt {verb} --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " + f"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt install --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " + cmd ) diff --git a/src/tools.py b/src/tools.py index abf224c1c..e9adedb2a 100644 --- a/src/tools.py +++ b/src/tools.py @@ -538,6 +538,8 @@ def _apt_log_line_is_relevant(line): "==> Keeping old config file as default.", "is a disabled or a static unit", " update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults", + "insserv: warning: current stop runlevel", + "insserv: warning: current start runlevel", ] return line.rstrip() and all(i not in line.rstrip() for i in irrelevants)