Display upgrade note

2005-07-25 Thread Roland Gruber
Hi all,

probably this has been asked before but my searches did not give proper
results.

I want to display a message to the user via debconf. The message should
only appear if the user upgrades from a version below a special value
(0.5.0 in my case).

My first attempt was to check if some directories already exist while
installation is at config-level. Unfortunately, the files are already
installed at this point.
Next I tried preinst-level but the debconf commands are not available at
this time.

Is there a standard way to get the old package version and compare it to
the new one?

Thanks in advance for your support.


Greetings,
Roland


signature.asc
Description: OpenPGP digital signature


Re: Display upgrade note

2005-07-25 Thread Margarita Manterola
On 7/25/05, Roland Gruber [EMAIL PROTECTED] wrote:

 I want to display a message to the user via debconf. The message should
 only appear if the user upgrades from a version below a special value
 (0.5.0 in my case).

 Is there a standard way to get the old package version and compare it to
 the new one?

As shown in the Upgrading diagram I made some time ago [1], and also,
as it is explained in the Debian Policy [2], when doing an upgrade,
the maintainer scripts are called with a second parameter that
indicates the package version.

This is to say, your postinst script will be called like:

   postinst configure 0.5.0

You can use that param to compare it to what you need.

[1]: http://women.alioth.debian.org/wiki/index.php/English/MaintainerScripts
[2]: 
http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact
 
-- 
Besos,
Marga



Re: Display upgrade note

2005-07-25 Thread Bartosz Fenski aka fEnIo
On Mon, Jul 25, 2005 at 02:08:02PM -0300, Margarita Manterola wrote:
  Is there a standard way to get the old package version and compare it to
  the new one?
 
 As shown in the Upgrading diagram I made some time ago [1], and also,
 as it is explained in the Debian Policy [2], when doing an upgrade,
 the maintainer scripts are called with a second parameter that
 indicates the package version.

Nice diagrams, but I would like to see reconfigure task there too.

regards
fEnIo

-- 
  ,''`.  Bartosz Fenski | mailto:[EMAIL PROTECTED] | pgp:0x13fefc40 | irc:fEnIo
 : :' :   32-050 Skawina - Glowackiego 3/15 - w. malopolskie - Poland
 `. `'   phone:+48602383548 | proud Debian maintainer and user
   `-  http://skawina.eu.org | jid:[EMAIL PROTECTED] | rlu:172001


signature.asc
Description: Digital signature


Re: Display upgrade note

2005-07-25 Thread Roland Gruber
Margarita Manterola schrieb:
 As shown in the Upgrading diagram I made some time ago [1], and also,
 as it is explained in the Debian Policy [2], when doing an upgrade,
 the maintainer scripts are called with a second parameter that
 indicates the package version.

thanks a lot for your fast help.


Greetings,
Roland


signature.asc
Description: OpenPGP digital signature


Re: Display upgrade note

2005-07-25 Thread Daniel Leidert
Am Montag, den 25.07.2005, 18:40 +0200 schrieb Roland Gruber:

 probably this has been asked before but my searches did not give proper
 results.
 
 I want to display a message to the user via debconf. The message should
 only appear if the user upgrades from a version below a special value
 (0.5.0 in my case).

Maybe you want to think about these two alternatives:

- add a NEWS.Debian so users with apt-listchanges installed will see the
advice (the advice should of course also be mentioned in README.Debian
or a similar file) - this is IMO the most common way for upgrade/update
notes

- add the debconf message to the package in general (a note like: If you
are upgrading from a version below ... OK) and done

Regards, Daniel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Display upgrade note

2005-07-25 Thread Geert Stappers
On Mon, Jul 25, 2005 at 08:10:07PM +0200, Daniel Leidert wrote:
 
 Maybe you want to think about these two alternatives:
 
 snip/

 - add the debconf message to the package in general (a note like: If you
 are upgrading from a version below ... OK) and done

Please avoid notes, make unattended installs possible.

Let the computer do

  if upgrade from version  below



Cheers
Geert Stappers



signature.asc
Description: Digital signature


Re: Display upgrade note

2005-07-25 Thread Roland Gruber
Hi Geert,

Geert Stappers schrieb:
 Please avoid notes, make unattended installs possible.

you are right, if possible then notes should be avoided.

But the problem is that the package is not usable after the upgrade
because the user has to recreate some configuration files.
The application has been rewritten almost completely. Therefore I think
the user should get a notice when upgrading from an older version.


Greetings,
Roland


signature.asc
Description: OpenPGP digital signature


Re: Display upgrade note

2005-07-25 Thread Justin Pryzby
On Tue, Jul 26, 2005 at 01:08:02AM +0200, Roland Gruber wrote:
 Hi Geert,
 
 Geert Stappers schrieb:
  Please avoid notes, make unattended installs possible.
 
 you are right, if possible then notes should be avoided.
 
 But the problem is that the package is not usable after the upgrade
 because the user has to recreate some configuration files.
 The application has been rewritten almost completely. Therefore I think
 the user should get a notice when upgrading from an older version.
If its a critical thing like a mailserver, then the user (an admin in
this case) should be able to abort the installation, too.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]