Hi Valetes,

On Fri, 27 Nov 2026 05:10:25 +0000 Valters Jansons
<[email protected]> wrote:
> > You are moving the symlink from libloc to libloc-database. I don't
think
> > this will work reliably with prerm/postinst scripts, as there is no
> > ordering guarantee for which package is configured or
> > removed/deconfigured first. I think you need at least a
Breaks/Replaces
> > relationship here: https://wiki.debian.org/PackageTransition
> 
> I do not think that this package needs a Breaks/Replaces: As
mentioned in #1155122 for libloc-database, the symlink was never
formally owned by this package. Maintainer scripts added the symlink,
so dpkg does not track this move.

> The libloc-database package will have a Breaks so that this package's
older prerm does not trigger unnecessarily.
> 
> I clarified this in the changelog and made a new upload in
https://mentors.debian.net/package/libloc/


Thanks for adding Breaks:, but Breaks alone isn't enoug - it needs to
be paired with Replaces:.

Looking at https://wiki.debian.org/PackageTransition, moving
/var/lib/location/database.db from libloc1t64 (Package A) to libloc-
database (Package B) where libloc1t64 only has a Recommends: on the
database matches Case #9 (Reorg).

To handle partial upgrades and error unwinds cleanly, both packages
need cross-declarations:

libloc-database: NeedsĀ both
Breaks: libloc1t64 (<< 0.9.19-3~)
Replaces: libloc1t64 (<< 0.9.19-3~).

libloc1t64: NeedsĀ 
Breaks: libloc-database (<< 0~20260822~0345-1~).

Also, please check the postinst check in libloc-database: [ ! -e
/var/lib/location/database.db ] evaluates to true if a dangling symlink
is present, causing ln -s to fail with "File exists" and swallow the
error via || true. Would a dangling symlink be a problem?

(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.)

Cheers,
-- 
tobi

Reply via email to