Re: How to detect an upgrade from an older version of a package

2008-07-15 Thread Thomas Goirand
Don Armstrong wrote: The right way to do this is to test the SQL database itself if it needs to be updated. [Indeed, ideally the module itself would handle upgrading itself if it was running an earlier version.] Don Armstrong Yes, mod_log_sql should be able to upgrade itself, we know that

Re: How to detect an upgrade from an older version of a package

2008-07-15 Thread Vincent Bernat
OoO En ce doux début de matinée du mardi 15 juillet 2008, vers 08:18, Thomas Goirand [EMAIL PROTECTED] disait : Anyway, thanks for all the good remarks, I think the last one from Don is the best answer (eg: check for the database format itself, and see if it needs upgrade). Another

Re: How to detect an upgrade from an older version of a package

2008-07-15 Thread Thomas Goirand
Vincent Bernat wrote: Another solution is to use dbconfig-common. You get for free a lot of things, including: - automatic upgrade of database (but it relies on package versions) - debconf questions already written (and already translated) Wrong. dbconfig-common is for apps, not for

Re: How to detect an upgrade from an older version of a package

2008-07-15 Thread Vincent Bernat
OoO Peu avant le début de l'après-midi du mardi 15 juillet 2008, vers 13:11, Thomas Goirand [EMAIL PROTECTED] disait : Another solution is to use dbconfig-common. You get for free a lot of things, including: - automatic upgrade of database (but it relies on package versions) - debconf

How to detect an upgrade from an older version of a package

2008-07-14 Thread Thomas Goirand
Hi, I want to make an update to libapache-mod-log-sql that needs some maintenances in it's SQL databases if we need to upgrade. Namely, it needs some table structure upgrades. I know many hacks to know that I'm upgrading (like doing dpkg -l, etc.), but what is the correct/policy way to know from

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Eugene V. Lyubimkin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Goirand wrote: Hi, I want to make an update to libapache-mod-log-sql that needs some maintenances in it's SQL databases if we need to upgrade. Namely, it needs some table structure upgrades. I know many hacks to know that I'm upgrading

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Patrick Schoenfeld
Hi, On Mon, Jul 14, 2008 at 04:05:05PM +0300, Eugene V. Lyubimkin wrote: I know many hacks to know that I'm upgrading (like doing dpkg -l, etc.), but what is the correct/policy way to know from what version my package is upgrading, so my postinst can run smoothly? Policy 6.6.3 says If

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Thomas Goirand
Eugene V. Lyubimkin wrote: IANADD. Policy 6.6.3 says If the package is being upgraded, call: new-preinst upgrade old-version Is it what you are seeking? That wont give me the version number from which I'm upgrading from, will it? Thomas -- To UNSUBSCRIBE, email to

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Thomas Goirand
Patrick Schoenfeld wrote: Additional (might be more to his interest, because he talked about his postinst) it says: postinst configure most-recently-configured-version If a package is upgraded the most-recently-configured-version is usually identical to old-version. It isn't if the

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Eugene V. Lyubimkin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Goirand wrote: Eugene V. Lyubimkin wrote: IANADD. Policy 6.6.3 says If the package is being upgraded, call: new-preinst upgrade old-version Is it what you are seeking? That wont give me the version number from which I'm

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Justin Pryzby
On Tue, Jul 15, 2008 at 03:26:53AM +0800, Thomas Goirand wrote: Patrick Schoenfeld wrote: Additional (might be more to his interest, because he talked about his postinst) it says: postinst configure most-recently-configured-version If a package is upgraded the

Re: How to detect an upgrade from an older version of a package

2008-07-14 Thread Don Armstrong
On Mon, 14 Jul 2008, Thomas Goirand wrote: I want to make an update to libapache-mod-log-sql that needs some maintenances in it's SQL databases if we need to upgrade. Namely, it needs some table structure upgrades. The right way to do this is to test the SQL database itself if it needs to be