Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338339 - PMS does not reflect reality for call order of pkg_* functions
Summary: PMS does not reflect reality for call order of pkg_* functions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 09:47 UTC by Ulrich Müller
Modified: 2023-08-26 06:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch (0001-Fix-call-order-of-functions-bug-338339.patch,1.83 KB, patch)
2010-09-22 09:52 UTC, Ulrich Müller
Details | Diff
Updated patch (0001-Fix-call-order-of-pkg_-functions-bug-338339.patch,2.19 KB, patch)
2010-10-11 08:02 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2010-09-22 09:47:08 UTC
PMS claims in section "Call Order":

"The call order for upgrading or downgrading a package is:
  * pkg_preinst
  * pkg_postinst
  * pkg_prerm for the package being replaced
  * pkg_postrm for the package being replaced"

whereas in reality the call order in portage is the same as for reinstalling a package, namely preinst, prerm, postrm, postinst.
Comment 1 Ulrich Müller gentoo-dev 2010-09-22 09:52:37 UTC
Created attachment 248342 [details, diff]
proposed patch
Comment 2 Ulrich Müller gentoo-dev 2010-09-22 10:02:12 UTC
Basically, this change reverts this commit: http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=2d3de7abf5484c616e9bc3fe398669d9935dd62c
Comment 3 Ciaran McCreesh 2010-09-22 13:39:40 UTC
It's not as simple as you think. Different post-EAPI-time versions of Portage have different call orders.

Paludis uses the original call order for old EAPIs, and the newer, changed-without-discussion-or-council-approval call order for newer EAPIs.

PMS needs to reflect that both behaviours are possible.
Comment 4 Ulrich Müller gentoo-dev 2010-09-22 15:22:32 UTC
*shrug* Portage and PMS disagreed, then *both* were changed, and now of course they still disagree, but the other way around. Maybe people should talk to each other before making such changes? ;-)

"Note: When up- or downgrading a package in EAPI 0 or 1, the last four phase functions can alternatively be called in the order pkg_preinst, pkg_postinst, pkg_prerm, pkg_postrm. This behaviour is deprecated."
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2010-09-22 16:15:15 UTC
(In reply to comment #4)
> 
> "Note: When up- or downgrading a package in EAPI 0 or 1, the last four phase
> functions can alternatively be called in the order pkg_preinst, pkg_postinst,
> pkg_prerm, pkg_postrm. This behaviour is deprecated."
> 

Or just call the order undefined and everyone who relies on the order should use a newer EAPI.
Comment 6 Ulrich Müller gentoo-dev 2010-09-24 09:07:58 UTC
(In reply to comment #5)
> Or just call the order undefined and everyone who relies on the order should
> use a newer EAPI.

Why not have the specification as tight as possible, if that needs only one sentence?

The main question is if a note with rather informal wording (as in comment #4) would be sufficient. Or do we need another EAPI dependent table for this?
Comment 7 Ulrich Müller gentoo-dev 2010-10-11 08:02:24 UTC
Created attachment 250193 [details, diff]
Updated patch

No answer.
So unless there are objections, I'll commit attached patch in a week from now.
Comment 8 Ulrich Müller gentoo-dev 2010-10-18 17:44:19 UTC
(In reply to comment #7)
> Created an attachment (id=250193) [details]
> So unless there are objections, I'll commit attached patch in a week from now.

Pushed to master.