Web lists-archives.com

Re: Declarative packaging (Was: Re: Intended MBF: maintainer scripts not using strict mode)




Hi!

On Thu, 2017-06-29 at 13:58:39 +0100, Ian Jackson wrote:
> Paul Wise writes ("Re: Declarative packaging (Was: Re: Intended MBF: maintainer scripts not using strict mode)"):
> > IIRC last time we discussed this, the recommendation was to set an
> > environment variable that maintainer scripts could check to determine
> > if they should do host-specific actions or just generic actions common
> > to all hosts. Personally I think that seems like a bit of a hack and
> > there needs to be a new state for packages to be in added to dpkg.

As mentioned on IRC, I've considered this as another side of the initial
boostrap problem we currently have. There is an early draft at
<https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap>, although
some parts have not been moved from other bug discussions and similar.

This specific problem you present could be considered the post-bootstrap
stage. While the one initially described on that spec would be mainly
the pre-bootstrap stage. I'll document this case there too. But…

> How about using triggers-pending for this ?
> 
> You'd need to canonical trigger name.

…yes, the advantage of using triggers is that the infrastructure is
already in place, it would require bootstrapping programs to activate
those triggers (by default, with the option to not do so) and
processing them at the post-bootstrap stage. Of course those triggers
would ideally be all non-awaiting.

And w/o having pondered about this too much, either of the solutions
seem technically good for the task. Although I think I'd have a
preference for the non-trigger option because that one means we can
potentially get rid of maintainer scripts which might otherwise end
up only doing bootstrap tasks, which helps in cycle breaking and makes
the common configuration potentially less prone to errors.

Thanks,
Guillem