Upgrade/downgrade doesn't preserve catalog registration, OTOH rebuild of the same version works fine. Reason is: The order of execution of pre/post_rm and pkg_postinst differs on upgrade from remerge. May be it's bug in ebuild(8) or some misconception in contemporary ebuilds of app-text/sgml-common. Reproducible: Always Steps to Reproduce: 1.Upgrade or downgrade app-text/sgml-common Actual Results: /usr/share/sgml/sgml-iso-entities-8879.1986/catalog is unregistered from /etc/sgml/catalog Expected Results: sgml-iso-entities catalog should keep beeing registered in system-wide catalog
Downgrade: [ebuild UD] app-text/sgml-common-0.6.3-r4 [0.6.3-r5] 0 kB [...] >>> Completed installing sgml-common-0.6.3-r4 into /var/tmp/portage/app-text/sgm l-common-0.6.3-r4/image/ [...] * Installing Catalogs... install-catalog: addition of /usr/share/sgml/sgml-iso-entities-8879.1986/catalog in /etc/sgml/sgml-ent.cat Warning: /usr/share/sgml/sgml-iso-entities-8879.1986/catalog is already installed in the centralized catalog /etc/sgml/sgml-ent.cat install-catalog: addition of /etc/sgml/sgml-ent.cat in /etc/sgml/sgml-docbook.cat Warning: /etc/sgml/sgml-ent.cat is already installed in the centralized catalog /etc/sgml/sgml-docbook.cat [...] >>> app-text/sgml-common-0.6.3-r4 merged. [...] >>> Unmerging app-text/sgml-common-0.6.3-r5... [...] * Removing Catalogs... install-catalog: removal of /usr/share/sgml/sgml-iso-entities-8879.1986/catalog from /etc/sgml/sgml-ent.cat install-catalog: removal of /etc/sgml/sgml-ent.cat from /etc/sgml/catalog install-catalog: removal of /etc/sgml/sgml-ent.cat from /etc/sgml/sgml-docbook.cat Upgrade: [ebuild U ] app-text/sgml-common-0.6.3-r5 [0.6.3-r4] 0 kB [...] >>> Completed installing sgml-common-0.6.3-r5 into /var/tmp/portage/app-text/sgml-common-0.6.3-r5/image/ [...] >>> Merging app-text/sgml-common-0.6.3-r5 to / [...] * Installing Catalogs... install-catalog: addition of /usr/share/sgml/sgml-iso-entities-8879.1986/catalog in /etc/sgml/sgml-ent.cat install-catalog: addition of /etc/sgml/sgml-ent.cat in /etc/sgml/catalog install-catalog: addition of /etc/sgml/sgml-ent.cat in /etc/sgml/sgml-docbook.cat [...] >>> app-text/sgml-common-0.6.3-r5 merged. [...] >>> Unmerging app-text/sgml-common-0.6.3-r4... [...] * Removing Catalogs... install-catalog: removal of /usr/share/sgml/sgml-iso-entities-8879.1986/catalog from /etc/sgml/sgml-ent.cat install-catalog: removal of /etc/sgml/sgml-ent.cat from /etc/sgml/catalog install-catalog: removal of /etc/sgml/sgml-ent.cat from /etc/sgml/sgml-docbook.cat Rebuild: [ebuild R ] app-text/sgml-common-0.6.3-r5 0 kB [...] >>> Completed installing sgml-common-0.6.3-r5 into /var/tmp/portage/app-text/sgml-common-0.6.3-r5/image/ [...] >>> Merging app-text/sgml-common-0.6.3-r5 to / [...] >>> Safely unmerging already-installed instance... [...] * Removing Catalogs... install-catalog: removal of /etc/sgml/sgml-ent.cat from /etc/sgml/sgml-docbook.cat Warning: /etc/sgml/sgml-ent.cat was not found in the centralized catalog /etc/sgml/sgml-docbook.cat >>> Original instance of package unmerged safely. * Installing Catalogs... install-catalog: addition of /usr/share/sgml/sgml-iso-entities-8879.1986/catalog in /etc/sgml/sgml-ent.cat install-catalog: addition of /etc/sgml/sgml-ent.cat in /etc/sgml/catalog install-catalog: addition of /etc/sgml/sgml-ent.cat in /etc/sgml/sgml-docbook.cat
*** Bug 194228 has been marked as a duplicate of this bug. ***
PMS now guarentees that pkg_postinst and pkg_postrm will be run in the correct order for upgrades. http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-11300010.2