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 the package is being upgraded, call: > > new-preinst upgrade old-version > " > Is it what you are seeking? >
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 configuration of the package already took place but the installation hasn't finished (half-installed state). That is as far as I understand it. Anyways using $2 as oldversion worked for me in every case so far. Regards, Patrick -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]