On Wed, 31 Mar 2010 22:29:50 +0200 Sebastian Pipping <sp...@gentoo.org> wrote: > On 03/31/10 22:19, Ciaran McCreesh wrote: > >> Is there some kind of evilness in this usage of has_version that I > >> am not aware of? > > > > Unfortunately, yes. > > > > Historically, has_version in pkg_postinst would return results based > > upon the version that *was* installed. > > What's status quo? What did it switch to?
Now you really need to use REPLACING_VERSIONS to do it cleanly, but that's only in EAPI 4, which still isn't implemented in Portage. As a hack, you can instead do the has_version check in pkg_preinst and use environment variable saving to get the result in pkg_postinst. It is not exactly pretty. -- Ciaran McCreesh
signature.asc
Description: PGP signature