On Sun, Jun 04, 2023 at 02:56:59PM +0100, Simon McVittie wrote: > I think one way or another, if anyone is going to set a package-level > dependency on systemd-tmpfiles, the first (preferred) dependency needs to > be on either a concrete provider (systemd or systemd-tmpfiles-standalone > in this case), or a default-systemd-tmpfiles virtual package > that only has one provider per architecture (which is the way > {default-,}dbus-{system,session}-bus are handled). Otherwise, you > can get a non-deterministic choice of default implementation, which > seems strictly worse than either depending on systemd or depending on > systemd-tmpfiles-standalone - if you're unlucky, it can have all the > disadvantages of either one of those.
Thank you for the elaborate writeup. There is little to add to what you write except for one minor aspect. > - actual result: apt's heuristic might have difficulty realising that > it needs to do that I think we should be able to guide apt here. I recently had to look into Replaces and in that process I also had to re-read policy section 7.6.2. It details the "other" use of Replaces to guide a package manager (e.g. apt) for changing implementations of an interface - which is exactly what we are talking about here. In essence, it says that we should do: Provides: systemd-tmpfiles Conflicts: systemd-tmpfiles Replaces: systemd-tmpfiles And systemd-standalone-tmpfiles does that. :) But systemd does not. :( systemd misses out on Conflicts and Replaces. I guess (but have not verified) that once these are added, apt would be happier to "upgrade" systemd-standalone-tmpfiles to systemd when needed. I've also experimented with a minimal chroot, installed the standalone tools and the asked apt to install libbiometric0 (which happens to have a dependency on systemd) and apt was quite happy with removing the standalone variants. This is still missing the consumers of the provided facilities though, so it might not be representative. Is there any concrete evidence of apt having difficulties in a real situation? Or maybe a constructed example demonstrating this? Thanks for being cautious, but I'd also like to understand whether this is hypothetical or real. Helmut