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

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



Hi Raphaël,

On Tue, May 02, 2023 at 12:30:21PM +0200, Raphael Hertzog wrote:
> We don't want to stat all the files in all packages but we could do better:
> if we are about to remove an old file that is available through a
> symlinked directory, we could check the new name of the file and see if
> it's available in some package... and if yes just forget the file without
> removing it.

Indeed, this is a neat idea. You are effectively implying that we only
ever move files from non-canonical locations to canonical locations and
never the other way round. I think this is a reasonable assumption and
this assumption is the one that makes your variant simpler.

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?

> This file removal is the reason of the moratorium and incuring some extra
> cost in some specific cases (installation through directory symlinks which
> is not the default case, and would not affect us after the migration is
> complete) seems certainly fair.

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.

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

Helmut


Reply to: