* [PATCH] libloc: Fix bug14047 - return 3 when database is latest version
@ 2026-09-12 10:34 Adolf Belka
0 siblings, 0 replies; only message in thread
From: Adolf Belka @ 2026-09-12 10:34 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
- Currently libloc returns 0 when the database is the current version. Tha man page says
it should return 3. The reason is that the return for that check is on its own so it
defaults to returning 0.
- This patch makes it return 3.
- Fix has been confirmed to return 3 on my vm testbed system.
- A separate patch will be submitted that adds the fix to location.in in the libloc repo
so that a future update version of libloc will include this fix and the patch in this
submission can then be removed.
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Fixes: bug14047
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
lfs/libloc | 3 ++-
....19-Return_3_when_database_is_latest_version.patch | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch
diff --git a/lfs/libloc b/lfs/libloc
index 5aee8813f..bfa0234d2 100644
--- a/lfs/libloc
+++ b/lfs/libloc
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2025 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2026 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -81,6 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
# https://lists.ipfire.org/pipermail/development/2022-November/014763.html
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch
cd $(DIR_APP) && ./autogen.sh
cd $(DIR_APP) && ./configure \
--prefix=/usr \
diff --git a/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch b/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch
new file mode 100644
index 000000000..4ebd84c10
--- /dev/null
+++ b/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch
@@ -0,0 +1,11 @@
+--- libloc-0.9.19/src/scripts/location.in.orig 2026-06-02 16:41:25.000000000 +0200
++++ libloc-0.9.19/src/scripts/location.in 2026-09-10 16:00:33.706282553 +0200
+@@ -468,7 +468,7 @@
+ # Check the version of the local database
+ if db and t and db.created_at >= t:
+ log.info("Already on the latest version")
+- return
++ return 3
+
+ # Download the database into the correct directory
+ tmpdir = os.path.dirname(ns.database)
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-12 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12 10:34 [PATCH] libloc: Fix bug14047 - return 3 when database is latest version Adolf Belka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox