if portage.match_from_list(portage.const.PORTAGE_PACKAGE_ATOM, [pkg]): msg = ("Not unmerging package %s " "since there is no valid reason for Portage to " "%s itself.") % (pkg.cpv, unmerge_action) skip_pkg = True This logic clearly does not account for sys-apps/portage being replaced by a package blocking it. There is a *valid* reason to remove it when it's replaced by another package providing the same files.
Yeah we can make this work, but we'll need portage to make a temporary copy of itself, like it does when it upgrades itself. For reference, the "Not unmerging package" code dates back to this commit from bug 357009: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cab19378be406d18a80114d00007e12b3310586d
(In reply to Zac Medico from comment #1) > For reference, the "Not unmerging package" code dates back to > this commit from bug 357009: > > https://gitweb.gentoo.org/proj/portage.git/commit/ > ?id=cab19378be406d18a80114d00007e12b3310586d It was extension of pre-existing code to handle a package with currently used Python interpreter. Original code for sys-apps/portage is from this commit: https://gitweb.gentoo.org/proj/portage.git/commit/?id=62781abb763a380a32b1841311a0ceed4430569d
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2) > (In reply to Zac Medico from comment #1) > > For reference, the "Not unmerging package" code dates back to > > this commit from bug 357009: > > > > https://gitweb.gentoo.org/proj/portage.git/commit/ > > ?id=cab19378be406d18a80114d00007e12b3310586d > > It was extension of pre-existing code to handle a package with currently > used Python interpreter. > Original code for sys-apps/portage is from this commit: > > https://gitweb.gentoo.org/proj/portage.git/commit/ > ?id=62781abb763a380a32b1841311a0ceed4430569d Thanks!