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

Re: Bug#582109: debian-policy: document triggers where appropriate

On Sat, 20 Jul 2013, Charles Plessy wrote:
> Can you explain what the bug is and what the correction will be ?  Because I

The bug is that triggers are run while the dependencies of the triggered
package are not satisfied. The fix is not to do that and wait until those
dependencies are satisfied (but guillem mentionned that it also needs some
cycle breaking code).

> The misleading point is "just like packages in installed".  In my
> understanding, when a package is upgraded, the packages that depend on it stay
> in the "Installed" state while the new version of the upgraded package is
> unpacked and configured.  Not just the triggers, but also any other command not
> related to the dpkg or apt session that would happen to run at that time can
> fail if they strictly require a function that is not available between unpack
> and configure.

That's true but it's not really comparable. "postinst triggered" ought to
work like "postinst configure" and there you have the guaranty that the
dependencies are configured.

> I do not see any other solution than applying the same restrictions on
> "postinst triggered" as for "postinst configure".  (PS: after reading the
> thread again, I just noticed that this also what you wrote in #671711#68).

I did not write that. On the contrary, re-read:

“The problematic fix is to ensure the same requirements for "postinst
triggered" as for "postinst configure". But we could enforce some
requirements that would probably solve the issues we saw without
introducing cycles.”

There are no "restrictions" for "postinst configure" (you can rely on
dependencies — except if you have a dependency cycle) and there should be
no restrictions for "postinst triggered". But right now, dpkg doesn't
ensure anything. And instead of nothing checked by dpkg, I suggested to
ensure some requirements nevertheless but which are less demanding than
those used by "postinst configure".

> (PPS: By the way, apart from Manoj's excellent diagrams at
> <http://people.debian.org/~srivasta/MaintainerScripts.html#sec-3.4.3>, is there
> an extensive documentation on how package upgrades are handled by APT and Dpkg ?)

I know https://wiki.debian.org/MaintainerScripts too but that's all.

Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/

Reply to: