[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DEP 17: Improve support for directory aliasing in dpkg



Hello,

On Tue, 02 May 2023, Helmut Grohne wrote:
> I think there is a caveat (whose severity I am unsure about): In order
> to rely on this (and on DEP 17), we will likely have versioned
> Pre-Depends on dpkg. Can we reasonably rule out the case where and old
> dpkg is running, unpacking a fixed dpkg, configuring the fixed dpkg and
> then unpacking an affected package still running the unfixed dpkg
> process?

I don't know APT well enough to answer that question but from my point of
view it's perfectly acceptable to document in the release notes that you
need to upgrade dpkg first.

> I think the file loss problem is one sufficient reason to have the
> moratorium. We didn't need other reasons once we knew this one. Now that
> we look into dropping the moratorium, we need to ensure that there are
> no reasons anymore and we learned that diversions are affected in a
> non-trivial way. So even if we were to fix just the file loss problem,
> the diversion problems would still be sufficient reason to keep the
> moratorium unless they were also fixed by the approach. Here you need
> both directions a) diverting a non-canonical location would have to
> divert a canonical file and b) diverting a canonical location would have
> to divert a non-canonical file. This is breaking the initial assumption.

Are you sure that we need anything for diversions except some documented
policy on how to deal with it?

AFAIK the following sequence performs no filesystem changes and should
be sufficient to move a diversion to its new location (I only consider the
case of an upgrade, not of a new installation that should just work
"normally" on the new location):

dpkg-divert --package $package --remove /bin/foo --no-rename
dpkg-divert --package $package --add /usr/bin/foo --divert /usr/bin/foo.diverted --no-rename

The case of update-alternatives is likely more tricky. You already looked
into it. That's a place where it will be harder to get things right
without some changes.

> In any case, this train of thought is definitely widening the solution
> space. Thank you very much.

You are welcome.

Cheers,
-- 
  ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <hertzog@debian.org>
  ⣾⠁⢠⠒⠀⣿⡁
  ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
  ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS


Reply to: