In lib/portage/emaint/modules/merges/merges.py it has his hardcoded emerge --ask argument: > def _emerge_pkg_atoms(self, module_output, pkg_atoms): > """ > Emerge the specified packages atoms. > > @param module_output: output will be written to > @type module_output: Class > @param pkg_atoms: packages atoms to emerge > @type pkg_atoms: set > @rtype: list > @return: List of results > """ > # TODO: rewrite code to use portage's APIs instead of a subprocess > env = { > "FEATURES" : "-collision-protect -protect-owned", > "PATH" : os.environ["PATH"] > } > emerge_cmd = ( > portage._python_interpreter, > '-b', > os.path.join(EPREFIX or '/', 'usr', 'bin', 'emerge'), > '--ask', > '--quiet', > '--oneshot', > '--complete-graph=y' > )
We can add an emerge --yes option as part of the implementation for this: --yes overrides earlier --ask args, and --ask overrides earlier --yes args We can add a package set to trigger the rebuilds, and emaint --fix merges can use that.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/ef4e08ccc107614d9ca85f86008c59cf https://github.com/gentoo/portage/pull/665
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=443a108d545e79facd6916cbab38a10afdd212f2 commit 443a108d545e79facd6916cbab38a10afdd212f2 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-23 23:33:57 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-02-08 00:58:17 +0000 emaint --fix merges: add -y, --yes option Since the emaint --fix merges uses emerge --ask, add a -y, --yes option to use --ask=n instead. Bug: https://bugs.gentoo.org/766767 Reviewed-by: Brian Dolbec <dolsen@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/emaint/modules/merges/__init__.py | 14 ++++++++++++-- lib/portage/emaint/modules/merges/merges.py | 11 +++++++---- man/emaint.1 | 6 +++++- 3 files changed, 24 insertions(+), 7 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b98e103aa15da331d647a8f65a45bb3bb4e3197 commit 6b98e103aa15da331d647a8f65a45bb3bb4e3197 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-02-22 13:46:04 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-02-22 13:54:29 +0000 sys-apps/portage: Bump to version 3.0.15 #715112 default enable FEATURES=binpkg-multi-instance #756778 content-hash distfiles layout #766459 emirrordist: prevent distfiles_db _pkg_str pickle problems #766767 emaint --fix merges: add -y, --yes option #766773 emerge: disable --autounmask-license by default #767913 portage.getpid: call os.getpid() lazily #770712 PopenProcess: use call_soon for _async_waipid in _start #771549 prevent USE="${USE} ..." misbehavior Bug: https://bugs.gentoo.org/766117 Bug: https://bugs.gentoo.org/715112 Bug: https://bugs.gentoo.org/756778 Bug: https://bugs.gentoo.org/766459 Bug: https://bugs.gentoo.org/766767 Bug: https://bugs.gentoo.org/766773 Bug: https://bugs.gentoo.org/767913 Bug: https://bugs.gentoo.org/770712 Bug: https://bugs.gentoo.org/771549 Package-Manager: Portage-3.0.15, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.15.ebuild | 268 +++++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+)