From d2a6dcd41a44d1a87c8f0965e0338be995565291 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Aug 2022 18:41:52 +0200 Subject: [PATCH] venv rebuild: migration should have an empty disclaimer when in auto mode --- src/migrations/0024_rebuild_python_venv.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/migrations/0024_rebuild_python_venv.py b/src/migrations/0024_rebuild_python_venv.py index 10db7a34a..5ead78b19 100644 --- a/src/migrations/0024_rebuild_python_venv.py +++ b/src/migrations/0024_rebuild_python_venv.py @@ -98,6 +98,10 @@ class MyMigration(Migration): if not self.is_pending(): return None + # Disclaimer should be empty if in auto, otherwise it excepts the --accept-disclaimer option during debian postinst + if self.mode == "auto": + return None + ignored_apps = [] rebuild_apps = [] @@ -133,6 +137,9 @@ class MyMigration(Migration): def run(self): + if self.mode == "auto": + return + venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/") for venv in venvs: