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

Re: /usr-move: Do we support upgrades without apt?



On Wed, Jan 03, 2024 at 04:43:45PM +0100, Helmut Grohne wrote:
> On Thu, Dec 21, 2023 at 10:41:57AM +0100, Helmut Grohne wrote:
> > We can restore lost files in a postinst. For this to work, we must
> > duplicate (e.g. hard link) affected files in the data.tar.
> > Example: #1057220 (systemd-sysv upgrade file loss)
> > Note that this approach is not policy compliant for essential packages
> > as they must work when unpacked and this is relevant for gzip being
> > diverted by zutils for instance.
> 
> We'll be doing this anyway. It is implemented in systemd-sysv.postinst
> and proposed in the gzip patch above. Yes, we are technically violating
> policy for gzip then, but I don't really see a technical way not to
> violate policy. I expect that we do not consider fixing this (unfixable)
> policy violation release-critical.

I agree that this is the best way forward.

Presumably the reason for this requirement in policy is that without it,
debootstrap cannot function. That is, debootstrap first unpacks all
Essential packages, without running any preinst or postinst scripts, and
*then* runs all the maintainer scripts. If an Essential package would
not function without its maintainer scripts being run, then debootstrap
could fail halfway through.

Running debootstrap cannot trigger the issue, because it does not
involve upgrades; and I do not believe that apt will special-case
Essential packages other than that it refuses to remove them unless
the user enters The Phrase[1], so we can consider that if it's something
that would work for a regular package, it will work for an Essential
one, too.

Perhaps if the above assumptions are correct, policy should be updated
such that the requirement is relaxed to only apply for initial
installation?

[1] At least, I think it logically *should* not do so, but then I'm not
    an apt developer and thus I may not know all the corner cases.

-- 
     w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}

I will have a Tin-Actinium-Potassium mixture, thanks.


Reply to: