commit:     ccd5546d74d0f1e5787b6daaa0f2d4d41226670c
Author:     Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sun Sep 14 09:56:40 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 10:39:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccd5546d

net-analyzer/gvmd: fix C23 build on 24.1.0, only show update instructions on 
update

Closes: https://bugs.gentoo.org/946583
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43780
Closes: https://github.com/gentoo/gentoo/pull/43780
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-analyzer/gvmd/gvmd-24.1.0.ebuild | 18 ++++++++++++------
 net-analyzer/gvmd/gvmd-25.2.1.ebuild | 14 ++++++++------
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/net-analyzer/gvmd/gvmd-24.1.0.ebuild 
b/net-analyzer/gvmd/gvmd-24.1.0.ebuild
index 39db42e8767d..2f43e4d1c19c 100644
--- a/net-analyzer/gvmd/gvmd-24.1.0.ebuild
+++ b/net-analyzer/gvmd/gvmd-24.1.0.ebuild
@@ -49,6 +49,10 @@ BDEPEND="
        )
        test? ( dev-libs/cgreen )
 "
+PATCHES=(
+       # Closes #946583
+       "${FILESDIR}/gvmd-25.2.1-fix-c23-build.patch"
+)
 
 src_prepare() {
        cmake_src_prepare
@@ -120,10 +124,12 @@ src_install() {
 }
 
 pkg_postinst() {
-       elog "If you are upgrading from a previous version, you need to update 
the database version."
-       elog "Please, create the running directory and give write permission to 
the database user"
-       elog "then run gvmd as the gvm user with --migrate option:"
-       elog "~# mkdir /run/gvmd"
-       elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
-       elog "~# sudo -u gvm gvmd --migrate"
+       if [[ ${REPLACING_VERSIONS} ]]; then
+               elog "If you are upgrading from a previous version, you need to 
update the database version."
+               elog "Please, create the running directory and give write 
permission to the database user"
+               elog "then run gvmd as the gvm user with --migrate option:"
+               elog "~# mkdir /run/gvmd"
+               elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
+               elog "~# sudo -u gvm gvmd --migrate"
+       fi
 }

diff --git a/net-analyzer/gvmd/gvmd-25.2.1.ebuild 
b/net-analyzer/gvmd/gvmd-25.2.1.ebuild
index 2af0cf5ab2f9..fcd4efa11f93 100644
--- a/net-analyzer/gvmd/gvmd-25.2.1.ebuild
+++ b/net-analyzer/gvmd/gvmd-25.2.1.ebuild
@@ -125,10 +125,12 @@ src_install() {
 }
 
 pkg_postinst() {
-       elog "If you are upgrading from a previous version, you need to update 
the database version."
-       elog "Please, create the running directory and give write permission to 
the database user"
-       elog "then run gvmd as the gvm user with --migrate option:"
-       elog "~# mkdir /run/gvmd"
-       elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
-       elog "~# sudo -u gvm gvmd --migrate"
+       if [[ ${REPLACING_VERSIONS} ]]; then
+               elog "If you are upgrading from a previous version, you need to 
update the database version."
+               elog "Please, create the running directory and give write 
permission to the database user"
+               elog "then run gvmd as the gvm user with --migrate option:"
+               elog "~# mkdir /run/gvmd"
+               elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
+               elog "~# sudo -u gvm gvmd --migrate"
+       fi
 }

Reply via email to