1 |
Author: halcy0n |
2 |
Date: 2009-01-01 20:59:23 +0000 (Thu, 01 Jan 2009) |
3 |
New Revision: 136 |
4 |
|
5 |
Modified: |
6 |
trunk/ebuild-writing/functions/pkg_postinst/text.xml |
7 |
Log: |
8 |
You can't call has_version in pkg_postinst anymore and get the version that was installed; bug #226419 |
9 |
|
10 |
|
11 |
Modified: trunk/ebuild-writing/functions/pkg_postinst/text.xml |
12 |
=================================================================== |
13 |
--- trunk/ebuild-writing/functions/pkg_postinst/text.xml 2008-12-20 18:58:23 UTC (rev 135) |
14 |
+++ trunk/ebuild-writing/functions/pkg_postinst/text.xml 2009-01-01 20:59:23 UTC (rev 136) |
15 |
@@ -45,7 +45,7 @@ |
16 |
<body> |
17 |
<codesample lang="ebuild"> |
18 |
pkg_postinst() { |
19 |
- if has_version '<x11-wm/fluxbox-0.9.10-r3' ; then |
20 |
+ if $OLD_FLUXBOX_VERSION ; then |
21 |
ewarn "You must restart fluxbox before using the [include] /directory/" |
22 |
ewarn "feature if you are upgrading from an older fluxbox!" |
23 |
ewarn " " |
24 |
@@ -63,10 +63,10 @@ |
25 |
<body> |
26 |
<p> |
27 |
The most common use for <c>pkg_postinst</c> is to display post-install |
28 |
-informational messages or warnings. Note that <c>has_version</c> will |
29 |
-operate on the version that <e>was</e> installed, which can be useful |
30 |
-for selective upgrade messages. |
31 |
-</p> |
32 |
+informational messages or warnings. If you want to display selective |
33 |
+upgrade messages, you should do the call to <c>has_version</c> in an |
34 |
+earlier phase, like <c>pkg_preinst</c>, and store the result in a global |
35 |
+variable.</p> |
36 |
</body> |
37 |
</section> |