Informative addendum to policy clarifying dpkg/maintainer script interface

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Informative addendum to policy clarifying dpkg/maintainer script interface

by Manoj Srivastava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

        I have created a document to clarify the interaction between
 maintainer scripts and dpkg, and examines the state changes for a
 package when a user interacts with the packaging system. The dynamic
 interactions between the packaging system and the package's maintainer
 scripts are described formally using UML diagrams. This document does
 not attempt to describe what the maintainer scripts can or can not do,
 concentrating instead mostly one the packaging system interface. It
 also provides a call graph of the maintainer scripts.

        This document is meant to be informative, not normative, at this
 point, and is presented here mostly since the maintainer scripts
 interaction section of policy is one of the more opaque
 segments. However, it also is trying to formally define the packaging
 system interface formally, and is meant to become normative at some
 point in the future, once it has buy in from the interested parties and
 has been checked for correctness.

        An early draft was sent over to the debian policy mailing list,
 but I thought the time has come to widen the audience a bit. Any
 feedback is appreciated. Please follow up to the policy list
 (debian-policy@... mailing.) Especially welcome would be
 any feedback from the dpkg folk about correctness of the interactions
 depicted.

        Oh, and before I forget, this is where the document lives currently:

 http://people.debian.org/~srivasta/MaintainerScripts.html

        Thanks in advance,

        manoj
--
Today is a good day to bribe a high-ranking public official.
Manoj Srivastava <srivasta@...> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Parent Message unknown Re: Informative addendum to policy clarifying dpkg/maintainer script interface

by Manoj Srivastava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 21 2009, Frank Küster wrote:

> Manoj Srivastava <srivasta@...> wrote:
>
>> Hi,
>>
>>         I have created a document to clarify the interaction between
>>  maintainer scripts and dpkg, and examines the state changes for a
>>  package when a user interacts with the packaging system.
>
> Thank you, that looks very useful.  What I'm missing, however, is any
> reference to debconf's config script.  Isn't that called by dpkg, too?

        Hmm. There are three different ways the config script is called,
 one is (for apt version 0.5 or above) via /etc/apt/apt.conf.d/70debconf
 -- this calls dpkg-preconfigure (8) to do to preconfigure the packages
 it is trying to install. That is beyond the scope of the document,
 since it is just an external program (apt) calling dpkg-preconfigure;
 and no package state change happens here -- this is just a debconf db
 update thing.

        The second way is when you  initiate debconf/confmodule in your
 postinst, then debconf  tries to call the config script again; this
 activity is thus part of what the postinst does, and not something this
 document covers (since we do not say anything about what maintainer
 scripts do or not do, just how they are called and what they return).

        Thirdly, if you call dpkg-reconfigure, the config script is run,
 but, again, this document is not documenting dpkg-reconfigure (or
 dpkg-preconfigure).  As far asI can see, dpkg-preconfigure also doe
 snot cause a package state transition, it just runs  the scripts
 (prerm. config, postinst).

        Could the dpkg folks chine in if I am wrong?

        manoj
--
Bugs, pl. n.: Small living things that small living boys throw on small
living girls.
Manoj Srivastava <srivasta@...> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Informative addendum to policy clarifying dpkg/maintainer script interface

by Guillem Jover :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

On Wed, 2009-10-21 at 20:01:00 -0500, Manoj Srivastava wrote:

> On Wed, Oct 21 2009, Frank Küster wrote:
> > Thank you, that looks very useful.  What I'm missing, however, is any
> > reference to debconf's config script.  Isn't that called by dpkg, too?
>
>         Hmm. There are three different ways the config script is called,
>  one is (for apt version 0.5 or above) via /etc/apt/apt.conf.d/70debconf
>  -- this calls dpkg-preconfigure (8) to do to preconfigure the packages
>  it is trying to install. That is beyond the scope of the document,
>  since it is just an external program (apt) calling dpkg-preconfigure;
>  and no package state change happens here -- this is just a debconf db
>  update thing.
>
>         The second way is when you  initiate debconf/confmodule in your
>  postinst, then debconf  tries to call the config script again; this
>  activity is thus part of what the postinst does, and not something this
>  document covers (since we do not say anything about what maintainer
>  scripts do or not do, just how they are called and what they return).
>
>         Thirdly, if you call dpkg-reconfigure, the config script is run,
>  but, again, this document is not documenting dpkg-reconfigure (or
>  dpkg-preconfigure).  As far asI can see, dpkg-preconfigure also doe
>  snot cause a package state transition, it just runs  the scripts
>  (prerm. config, postinst).
>
>         Could the dpkg folks chine in if I am wrong?

This seems about right.

regards,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...