On Tue, 21 Aug 2012 15:24:57 +0200
Amadeusz Żołnowski <[email protected]> wrote:
> We have "has_version" function to check if user has
> actually updated from relevant version.  Please use this to not
> confuse users who installed the package first time or are upgrading
> from Y to another version.

Doing it using has_version isn't really recommended, since...

...if EAPIs before 2 are involved, the order of pkg_ functions on an
upgrade, reinstall or downgrade might not be what you expect.

...the behaviour of has_version in the case of upgrades, reinstalls or
downgrades may not be what you expect.

...the behaviour of has_version in the case of upgrades, reinstalls or
downgrades is not what it used to be due to a non-EAPI-controlled
change in behaviour from Portage, meaning some documentation and
examples are now wrong, and the way you used to do it doesn't work any
more.

...an upgrade can result in the removal of two versions of a package,
not just one, if slots have changed.

It's thus much better to use REPLACING_VERSIONS (which is plural, and
this is important) rather than has_version, if you're asking about the
current package rather than another package.

-- 
Ciaran McCreesh

Attachment: signature.asc
Description: PGP signature

Reply via email to