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

Re: finding version of package being installed in postinst



On Sun, 18 Mar 2001 16:11:47 +0100 Eric Van Buggenhaut <eric@eric.ath.cx> wrote
:

> On Sun, Mar 18, 2001 at 02:29:31AM +0100, Ivo Timmermans wrote:
[...]
> > So I wondered if I could somehow find out if the user is upgrading
> > from a version before this upstream version, and issue a message
> > referring to a document somewhere in /usr/share/doc during postinst.
> 
> I have faced the same problem with a package for the last days. If you find
> out, please let me know :-)

>From /usr/share/doc/packaging-manual/packaging.html/
ch-maintainerscripts.html:

6.2 Summary of ways maintainer scripts are called
...
* postinst configure most-recently-configured-version

So if the old upstream version was configured properly, postinst will get 
its version number.

But - do NOT do this just by echoing stuff out from postinst; this breaks 
for non-interactive installs. Read up on debconf and have it display a 
note for the user (as the non-interactive frontend will mail root with 
this note). It also might be a good idea to read up on debconf anyway so 
you can use it to configure the package :)

Hope this helps,

-chris
-- 
"Meat. They're made out of meat."

"It's better than bad, it's good!"

(I subscribe to all lists that I post to; please do not Cc me on list
reply)
Chris Danis                                 screech@mad.scientist.com
                                                   screechco@home.com
                                                     dadanish@usa.net




Reply to: