attached is a simple ebuild script i made while doing something else ... but i noticed that when you run these series of commands, pkg_postrm and pkg_prerm dont seem to be run ... root@rux0r testing # emerge testing Calculating dependencies ...done! >>> emerge (1 of 1) dev-lang/testing-0 to / pkg_setup: /var/tmp >>> WORKDIR is up-to-date, keeping... src_compile: /var/tmp/portage/testing-0/work/testing-0 >>> Install testing-0 into /var/tmp/portage/testing-0/image/ category dev-lang src_install: /var/tmp/portage/testing-0/work/testing-0 strip: >>> Completed installing into /var/tmp/portage/testing-0/image/ >>> Merging dev-lang/testing-0 to / pkg_preinst: /usr/local/portage/dev-lang/testing pkg_postinst: /usr/local/portage/dev-lang/testing >>> Regenerating /etc/ld.so.cache... >>> dev-lang/testing-0 merged. * GNU info directory index is up-to-date. root@rux0r testing # emerge testing Calculating dependencies ...done! >>> emerge (1 of 1) dev-lang/testing-0 to / pkg_setup: /var/tmp >>> WORKDIR is up-to-date, keeping... src_compile: /var/tmp/portage/testing-0/work/testing-0 >>> Install testing-0 into /var/tmp/portage/testing-0/image/ category dev-lang src_install: /var/tmp/portage/testing-0/work/testing-0 strip: >>> Completed installing into /var/tmp/portage/testing-0/image/ >>> Merging dev-lang/testing-0 to / pkg_preinst: /usr/local/portage/dev-lang/testing pkg_postinst: /usr/local/portage/dev-lang/testing >>> Regenerating /etc/ld.so.cache... >>> dev-lang/testing-0 merged. * GNU info directory index is up-to-date. root@rux0r testing # emerge unmerge testing dev-lang/testing selected: 0 protected: none omitted: none >>> Packages in red are slated for removal. >>> Packages in green will not be removed. >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging dev-lang/testing-0... No package files given... Grabbing a set. >>> Regenerating /etc/ld.so.cache... * GNU info directory index is up-to-date. root@rux0r testing #
Created attachment 5296 [details] testing-0.ebuild
but if you have the ebuild install a file it will run both functions ...
this *might* be useful for metaebuilds ... ones that are in place just to emerge other packages (like the kde/gnome ebuilds)
This bug has been fixed in the current stable portage. I remember I fixed it :)