Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766767 - sys-apps/portage: emaint --fix merges forces --ask and an override --yes option would be nice
Summary: sys-apps/portage: emaint --fix merges forces --ask and an override --yes opti...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 766117
Blocks:
  Show dependency tree
 
Reported: 2021-01-23 22:36 UTC by Zac Medico
Modified: 2021-03-31 20:53 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 Zac Medico gentoo-dev 2021-01-23 22:36:15 UTC
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'
> 		)
Comment 1 Zac Medico gentoo-dev 2021-01-23 22:47:04 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2021-02-08 01:06:05 UTC
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(-)
Comment 4 Larry the Git Cow gentoo-dev 2021-02-22 13:54:41 UTC
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(+)