Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651232 - sys-apps/portage: unmerge logic blocks removing itself when replaced through blocker
Summary: sys-apps/portage: unmerge logic blocks removing itself when replaced through ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 244975
Blocks:
  Show dependency tree
 
Reported: 2018-03-23 07:54 UTC by Michał Górny
Modified: 2018-03-24 02:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-23 07:54:09 UTC
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.
Comment 1 Zac Medico gentoo-dev 2018-03-23 20:05:54 UTC
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
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-03-24 02:24:10 UTC
(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
Comment 3 Zac Medico gentoo-dev 2018-03-24 02:42:09 UTC
(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!