Article View: linux.debian.bugs.dist
Article #6900Bug#1155121: RFS: libloc/0.9.20-1 -- IP geolocation query library
From: Valters Jansons
Date: Mon, 30 Nov 2026 18:10
Date: Mon, 30 Nov 2026 18:10
87 lines
5698 bytes
5698 bytes
Hi Tobias, > Thanks for adding Breaks:, but Breaks alone isn't enoug - it needs to > be paired with Replaces:. PackageTransition talks about moving files which are formally owned by packages. However, `dpkg -S /var/lib/location/database.db` shows no owner, as neither package has ever installed it directly as a file. Therefore I believe Replaces would be a no-op in our scenario. > To handle partial upgrades and error unwinds cleanly, both packages > need cross-declarations: In practice, when a new libloc1t64 is freshly installed with an old libloc-database, the symlink does not get created. On upgrade, the existing link stays. The fresh install is sub-optimal, but an update of libloc-database would then add the link. If libloc1t64 also Breaks the old libloc-database, then whenever only the old one is available, fresh installs skip the Recommends, and apt never adds it back later. I think it's cleaner to let the old one be installed and get upgraded. However, we need the Breaks in libloc-database to protect against old libloc1t64 prerm logic, which deletes the link on remove. Error unwinds are not affected either way: the Breaks only adds no-op deconfigure calls on the old libloc1t64, and I added abort-remove handling in the new libloc-database postinst. > Also, please check the postinst check in libloc-database: > [...] > Would a dangling symlink be a problem? No, a dangling symlink is not a concern in libloc-database. At postinst configure time, the intended link target is already unpacked so any dangling symlink shows that a user has made some custom changes. I updated the maintainer scripts to leave local modifications be, testing -L and no longer suppressing errors with || true. I also added a postinst in libloc1t64: Some dangling links may have been created in previous versions, so we should clean them up as a one-time operation. Thank you for surfacing this. > (Also, out of curiosity: I assume the symlink is there so a local admin > can swap in their own database without touching what's shipped under > /usr/share/.... If that's not actually a use case you need to support, > or if libloc could just point straight to /usr/share/..., or ship > directly under /var/lib/... - dropping the symlink might save you a > bunch of maintainer-script headaches.) The primary scenario is that `location update` (run daily by location-update.timer, enabled by default) pulls in the latest database over internet and renames its download over that /var/lib path. This is the default location for bindings and the CLI tooling. If we set the default to /usr/share, then the updater would also write to /usr/share. Shipping the database under /var/lib instead would make dpkg overwrite a newer local download on every libloc-database upgrade, and delete it on removal. To drop the symlink, we would need upstream to support reading from multiple locations: If the /var/lib file exists, read there, otherwise read from /usr/share. This is currently not supported. Effectively, what the symlink is for is: 1. The time until the download is done. It's a daily task, and the bindings/CLI would not trigger a download if the file is missing. 2. Installations where the timer never runs, such as when lua-location is installed on its own. 3. Hosts where the internet download cannot be done. They never get an updated download, so the Debian archive provides all files needed for a usable installation. I have uploaded new versions to mentors to inform dpkg that /var/lib/location is also used by libloc-database, and to clean up the maintainer script logic. If after my explanations, you still think that libloc-database should have a Replaces and libloc1t64 should have a Breaks, let me know and I will add them in the next upload. -- Valters Jansons
Technical Details
Message-ID:
<O5dZ7-fanh-19@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<O2YUx-dSNk-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Valters Jansons <valters@vibesolutions.eu> Newsgroups: linux.debian.bugs.dist Subject: Bug#1155121: RFS: libloc/0.9.20-1 -- IP geolocation query library Date: Mon, 30 Nov 2026 19:10:01 +0100 Message-ID: <O5dZ7-fanh-19@gated-at.bofh.it> References: <O2YUx-dSNk-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Nov 30 18:05:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Valters Jansons <valters@vibesolutions.eu>, 1155121@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: package-sponsorship-requests@lists.debian.org X-Debian-Pr-Message: followup 1155121 X-Debian-Pr-Package: sponsorship-requests X-Debian-Pr-Keywords: moreinfo Feedback-ID: 165095126:user:proton X-Pm-Message-ID: a30d209f01817cd0a2947c6963c10ed49e5fd789 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006125 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 87 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Tobias Frost <tobi@debian.org> X-Original-Date: Mon, 30 Nov 2026 17:57:30 +0000 X-Original-Message-ID: <mlBwt1TPUstfEBLD-c_X-yiNHLn-eXyfwaNQjcrikL07Y0OkwlLVS9mnOwgQMP3lSznsLBTx_ltGe0Ipkop-mrFvfvgXoc2jY8N07Dz2_TM=@vibesolutions.eu> X-Original-References: <179552742620.1445.2112215747229139906.reportbug@VT14-G5.localdomain>