From 13d50f4f9a1f9070976259e387b9cee20b42ce6f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 19 Feb 2023 19:40:15 +0100 Subject: [PATCH] postgresql: ugly hack to hide boring warning messages when installing postgresql with apt the first time ... --- src/hook.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/hook.py b/src/hook.py index 42d9d3eac..36fb8f814 100644 --- a/src/hook.py +++ b/src/hook.py @@ -352,6 +352,30 @@ def hook_exec( r"dpkg: warning: while removing .* not empty so not removed", r"apt-key output should not be parsed", r"update-rc.d: ", + r"update-alternatives: ", + # Postgresql boring messages -_- + r"Building PostgreSQL dictionaries from .*", + r'Removing obsolete dictionary files', + r'Creating new PostgreSQL cluster', + r'/usr/lib/postgresql/13/bin/initdb', + r'The files belonging to this database system will be owned by user', + r'This user must also own the server process.', + r'The database cluster will be initialized with locale', + r'The default database encoding has accordingly been set to', + r'The default text search configuration will be set to', + r'Data page checksums are disabled.', + r'fixing permissions on existing directory /var/lib/postgresql/13/main ... ok', + r'creating subdirectories \.\.\. ok', + r'selecting dynamic .* \.\.\. ', + r'selecting default .* \.\.\. ', + r'creating configuration files \.\.\. ok', + r'running bootstrap script \.\.\. ok', + r'performing post-bootstrap initialization \.\.\. ok', + r'syncing data to disk \.\.\. ok', + r'Success. You can now start the database server using:', + r'pg_ctlcluster \d\d main start', + r'Ver\s*Cluster\s*Port\s*Status\s*Owner\s*Data\s*directory', + r'/var/lib/postgresql/\d\d/main /var/log/postgresql/postgresql-\d\d-main.log', ] return all(not re.search(w, msg) for w in irrelevant_warnings)