* [gentoo-commits] portage r10684 - main/branches/2.1.2/doc/package/ebuild
@ 2008-06-17 5:46 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-17 5:46 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-06-17 05:46:33 +0000 (Tue, 17 Jun 2008)
New Revision: 10684
Modified:
main/branches/2.1.2/doc/package/ebuild/phases.docbook
Log:
Add a "Interaction with previous installed version" section to document the
upgrade/downgrade phase execution order change from bug #226505.
(trunk r10683)
Modified: main/branches/2.1.2/doc/package/ebuild/phases.docbook
===================================================================
--- main/branches/2.1.2/doc/package/ebuild/phases.docbook 2008-06-17 05:44:21 UTC (rev 10683)
+++ main/branches/2.1.2/doc/package/ebuild/phases.docbook 2008-06-17 05:46:33 UTC (rev 10684)
@@ -40,4 +40,61 @@
</listitem>
</itemizedlist>
</para>
+ <sect2 id='package-ebuild-phases-previous-installed'>
+ <title>Interaction with previous installed version</title>
+ <para>
+ The order for upgrade and downgrade operations changed in
+ version 2.1.5, but the order for reinstall operations remained unchanged.
+ </para>
+ <sect3 id='package-ebuild-phases-before-2.1.5'>
+ <title>Upgrade/downgrade order used by versions less than 2.1.5 (deprecated)</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ pkg_preinst
+ </listitem>
+ <listitem>
+ pkg_postinst
+ </listitem>
+ <listitem>
+ pkg_prerm
+ </listitem>
+ <listitem>
+ pkg_postrm
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ <sect3 id='package-ebuild-phases-after-2.1.5'>
+ <title>Upgrade/downgrade order starting with version 2.1.5</title>
+ <para>
+ The new order for upgrades and downgrades is identical to the order used
+ for reinstall operations:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ pkg_preinst
+ </listitem>
+ <listitem>
+ pkg_prerm
+ </listitem>
+ <listitem>
+ pkg_postrm
+ </listitem>
+ <listitem>
+ pkg_postinst
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Now that pkg_postinst is called after all other phases, it's not possible to
+ call has_version in pkg_postinst to detect whether the current install
+ operation is an upgrade or downgrade. If this information is needed during the
+ pkg_postinst phase, do the has_version call in an earlier phase (such as
+ pkg_preinst) and store the result in a global variable to be accessed by
+ pkg_postinst when it is called.
+ </para>
+ </sect3>
+ </sect2>
</sect1>
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-17 5:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17 5:46 [gentoo-commits] portage r10684 - main/branches/2.1.2/doc/package/ebuild Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox