Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226121 - Request: 'mergecomplete' hook for ebuilds and bashrc. To be executed at the very end of package merge.
Summary: Request: 'mergecomplete' hook for ebuilds and bashrc. To be executed at the v...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-12 20:00 UTC by Eric Garver
Modified: 2008-07-11 00:30 UTC (History)
0 users

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


Attachments
Patch that works with Portage 2.1.4.4 (mergecomplete.patch,2.41 KB, patch)
2008-06-12 20:04 UTC, Eric Garver
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Garver 2008-06-12 20:00:05 UTC
A hook at the very end of a package merge would be nice. 'postinst' is close, but happens before files belonging to a previous version of the merged package are removed. 'mergecomplete' should happen just before portage moves on to the next package/atom to merge. This is a good place to take a snapshot of the file system, restart services, etc.

Reproducible: Always

Steps to Reproduce:
Comment 1 Eric Garver 2008-06-12 20:04:37 UTC
Created attachment 156541 [details, diff]
Patch that works with Portage 2.1.4.4

`cd /usr; patch -p0 < /path/to/mergecomplete.patch`

I hope this is the appropriate method to create the hook.
Exhaustive testing not done.
Comment 2 Eric Garver 2008-07-11 00:30:51 UTC
For >portage-2.1.5 pkg_postinst is now called after merging the package into the file system AND unmerging previous versions.

As of >portage-2.2_rc1 the last regeneration of environment.bz2 for the package is done AFTER pkg_postinst is called. See bug #155993.

postinst is now called in the treewalk function in pym/portage/dbapi/vartree.py