]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4159] Fix duplicate version
authorAndrei Pavel <andrei@isc.org>
Mon, 10 Nov 2025 14:28:41 +0000 (16:28 +0200)
committerAndrei Pavel <andrei@isc.org>
Mon, 10 Nov 2025 14:58:02 +0000 (16:58 +0200)
meson.build
src/bin/admin/kea-admin.in
src/bin/admin/meson.build
src/bin/keactrl/keactrl.in
src/bin/keactrl/meson.build
src/bin/shell/kea-shell.in
src/bin/shell/meson.build
src/lib/log/compiler/message.cc

index 92fce53153688f4762fec182f612e7b3d3a91e44..f274985ddca4f08dcfb3172a4b3fd3a600d1208e 100644 (file)
@@ -618,10 +618,7 @@ elif fs.is_dir('.git')
 else
     SOURCE_OF_INSTALLATION = 'tarball'
 endif
-conf_data.set(
-    'EXTENDED_VERSION',
-    f'"@PROJECT_VERSION@ (@SOURCE_OF_INSTALLATION@)"',
-)
+conf_data.set('EXTENDED_VERSION', f'"@SOURCE_OF_INSTALLATION@"')
 
 if PROJECT_VERSION.split('.')[1].to_int() % 2 == 0
     package_version_type = 'stable'
index 76c42ad9f218114b8c90726abc44c1ed53ff6437..2c0616f97f794314743878ab2c9c805f954b745c 100755 (executable)
@@ -848,7 +848,7 @@ if test "${command}" = "-v" || test "${command}" = "--version"; then
 fi
 
 if test "${command}" = "-V"; then
-    echo "${EXTENDED_VERSION}"
+    echo "${PACKAGE_VERSION} (${EXTENDED_VERSION})"
     exit 0
 fi
 
index e990a488522d2a57acf05e1c1f6cecb8ef88913c..23a375afc85f27134fd8eb46c963cf56c1b1873e 100644 (file)
@@ -5,10 +5,7 @@ kea_admin_conf_data.set('datarootdir', f'${prefix}/@DATADIR@')
 kea_admin_conf_data.set('PACKAGE', 'kea')
 kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
 kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
-kea_admin_conf_data.set(
-    'EXTENDED_VERSION',
-    PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+kea_admin_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
 if TESTS_OPT.enabled()
     kea_admin_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
 else
index da108d89fc14711c31805c8e51dc273820409557..d0c0be7311bb13a0b8219cea1d88f8c63a139905 100755 (executable)
@@ -356,7 +356,7 @@ if test "${command}" = "-v" || test "${command}" = "--version"; then
 fi
 
 if test "${command}" = "-V"; then
-    echo "${EXTENDED_VERSION}"
+    echo "${PACKAGE_VERSION} (${EXTENDED_VERSION})"
     exit 0
 fi
 
index 0b5b860844643f00964288c3ebf83727129cc0a7..0159324870274da24aee6d045af989bf11cf4f5c 100644 (file)
@@ -9,10 +9,7 @@ if NETCONF_DEP.found()
 else
     keactrl_conf_data.set('HAVE_NETCONF', 'no')
 endif
-keactrl_conf_data.set(
-    'EXTENDED_VERSION',
-    PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+keactrl_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
 keactrl_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
 keactrl_conf_data.set('runstatedir', '${prefix}/' + LOCALSTATEDIR + '/run')
 keactrl_conf_data.set('localstatedir', '${prefix}/' + LOCALSTATEDIR)
index 445ed56838c53a66f94bef1e823037d97b30ba53..d2ea6ca3e8d58bbe661b29d556d7638156072eab 100755 (executable)
@@ -96,7 +96,7 @@ def shell_body():
         sys.exit(0)
 
     if cmd_args.V:
-        print(EXTENDED_VERSION)
+        print(f'{VERSION} ({EXTENDED_VERSION})')
         sys.exit(0)
 
     # Ok, now it's time to put the parameters parsed into the structure to be
index 273293d85006793aefada84ead2c58b978f6d09d..1a1c38944ab09e5e00658e7991536832d298b2a4 100644 (file)
@@ -1,10 +1,7 @@
 kea_shell_conf_data = configuration_data()
 kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
 kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
-kea_shell_conf_data.set(
-    'EXTENDED_VERSION',
-    PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+kea_shell_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
 kea_shell_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
 
 configure_file(
index 981f7385bb2d4a2486c78eedd16b1beaf73bec82..9b1126d342898e5efe69954adff67430abf3290f 100644 (file)
@@ -1,10 +1,11 @@
-// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2025 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #include <config.h>
+#include <kea_version.h>
 
 #include <cctype>
 #include <cstddef>
@@ -68,6 +69,11 @@ version() {
     cout << VERSION << "\n";
 }
 
+void
+extended_version() {
+    cout << VERSION << " (" << EXTENDED_VERSION << ")\n";
+}
+
 /// \brief Print Usage
 ///
 /// Prints program usage to stdout.
@@ -439,7 +445,7 @@ errorDuplicates(MessageReader& reader) {
 int
 main(int argc, char* argv[]) {
 
-    const char* soptions = "hvpd:";               // Short options
+    const char* soptions = "hvVpd:";  // Short options
 
     optind = 1;             // Ensure we start a new scan
     int  opt;               // Value of the option
@@ -460,6 +466,10 @@ main(int argc, char* argv[]) {
                 version();
                 return (0);
 
+            case 'V':
+                extended_version();
+                return (0);
+
             default:
                 // A message will have already been output about the error.
                 return (1);