1 |
On Tue, 21 Aug 2012 15:24:57 +0200 |
2 |
Amadeusz Żołnowski <aidecoe@g.o> wrote: |
3 |
> We have "has_version" function to check if user has |
4 |
> actually updated from relevant version. Please use this to not |
5 |
> confuse users who installed the package first time or are upgrading |
6 |
> from Y to another version. |
7 |
|
8 |
Doing it using has_version isn't really recommended, since... |
9 |
|
10 |
...if EAPIs before 2 are involved, the order of pkg_ functions on an |
11 |
upgrade, reinstall or downgrade might not be what you expect. |
12 |
|
13 |
...the behaviour of has_version in the case of upgrades, reinstalls or |
14 |
downgrades may not be what you expect. |
15 |
|
16 |
...the behaviour of has_version in the case of upgrades, reinstalls or |
17 |
downgrades is not what it used to be due to a non-EAPI-controlled |
18 |
change in behaviour from Portage, meaning some documentation and |
19 |
examples are now wrong, and the way you used to do it doesn't work any |
20 |
more. |
21 |
|
22 |
...an upgrade can result in the removal of two versions of a package, |
23 |
not just one, if slots have changed. |
24 |
|
25 |
It's thus much better to use REPLACING_VERSIONS (which is plural, and |
26 |
this is important) rather than has_version, if you're asking about the |
27 |
current package rather than another package. |
28 |
|
29 |
-- |
30 |
Ciaran McCreesh |