When preinst is called with $1 = "upgrade", $2 is set with old version. How should I get programmatically the new version (the one being currently installed), to compare with "dpkg --compare-versions". -- Andrey Utkin