From 41b5028be7cc9aad0ea7d045e57a9f95896f3fa6 Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 8 Sep 2021 14:03:38 +0200 Subject: [PATCH 1/2] Log warning if --rebuild-gvmd-data fails In addition to printing it to stdout the failure message will also be written to the gvmd log. (cherry picked from commit 70e7e7341905f4c889a286475acc82586e51b744) --- src/gvmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gvmd.c b/src/gvmd.c index a52a92022..1e16723f1 100644 --- a/src/gvmd.c +++ b/src/gvmd.c @@ -2522,13 +2522,15 @@ gvmd (int argc, char** argv) log_config, &database, &error_msg); - log_config_free (); if (ret) { + g_warning ("Failed to rebuild gvmd data: %s\n", error_msg); printf ("Failed to rebuild gvmd data: %s\n", error_msg); g_free (error_msg); + log_config_free (); return EXIT_FAILURE; } + log_config_free (); return EXIT_SUCCESS; } From 7ec3e42ca9383888cc018952eafc1c41230b670d Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 8 Sep 2021 14:09:51 +0200 Subject: [PATCH 2/2] Amend CHANGELOG for data rebuild failure logging (cherry picked from commit b8ce65a1a1c2e4453a193d2a68289017b8e4eb18) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd94684c6..1e86e699d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [21.4.4] - Unreleased ### Added -- Add --rebuild-gvmd-data command line option [#1680](https://github.com/greenbone/gvmd/pull/1680) +- Add --rebuild-gvmd-data command line option [#1680](https://github.com/greenbone/gvmd/pull/1680) [#1683](https://github.com/greenbone/gvmd/pull/1683) ### Changed ### Deprecated