Summary: | sys-apps/portage-2.2.11 - TypeError: query() missing 1 required positional argument: 'enter_invalid' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Deutschmann (RETIRED) <whissi> |
Component: | [OLD] Core system | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andre, floppym, mgmadden, powerman-asdf, tusklahoma |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 484436 | ||
Attachments: | Use query function from UserQuery instance, not the class |
Description
Thomas Deutschmann (RETIRED)
2014-08-03 19:53:07 UTC
I'm unable to reproduce this. What version of python do you have selected? # eselect python list Available Python interpreters: [1] python2.7 [2] python3.3 * [3] python3.4 I think you are unable to reproduce because sys-kernel/gentoo-sources:3.10.48 isn't available anymore within portage. On all the systems where I was able to reproduce the problem, sys-kernel/gentoo-sources:3.10.48 was already installed. Note, "sys-kernel/gentoo-sources" is in my world file (no explicit version). I didn't run "emerge --depclean" for a while... so there were multiple old gentoo-sources packages installed. Now it was time to clean up the system but I wanted to keep 3.10.48... that's when I noticed the problem. I can't find anything wrong with the portage code. Even your traceback shows the correct parameters. Please try re-emerging portage and use other pythons. It must be a glitch somewhere in your system. > Please try re-emerging portage and use other pythons. > It must be a glitch somewhere in your system. Tried everything: 1) Re-emerged portage 2) Re-emerged python 3) python-updater 4) Tested Python v2.7, v3.3 and v3.4... I am able to reproduce the problem on all my systems. Steps to reproduce: # cd /usr/portage/sys-kernel/gentoo-sources/ # wget -O gentoo-sources-3.10.48.ebuild http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-3.10.48.ebuild?hideattic=0&view=log # ebuild gentoo-sources-3.10.48.ebuild digest # emerge --ask --oneshot sys-kernel/gentoo-sources:3.10.48 # emerge --ask --noreplace sys-kernel/gentoo-sources:3.10.48 These are the packages that would be merged, in order: Calculating dependencies... done! Total: 0 packages, Size of downloads: 0 KiB * sys-kernel/gentoo-sources:3.10.48 Traceback (most recent call last): File "/usr/bin/emerge", line 51, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1054, in emerge_main return run_action(emerge_config) File "/usr/lib64/portage/pym/_emerge/actions.py", line 4066, in run_action emerge_config.args, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 442, in action_build mydepgraph.saveNomergeFavorites() File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 7928, in saveNomergeFavorites if self.query(prompt, enter_invalid) == "No": TypeError: query() missing 1 required positional argument: 'enter_invalid' Well, the wget URL should be "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-3.10.48.ebuild"... And I am now using "--ignore-default-opts" just to make sure no custom setting is causing any problems. Another way to reproduce: 1. Open /var/lib/portage/world 2. Remove any package form the list, e.g. "app-editors/nano" 3. # emerge --ignore-default-opts --ask --noreplace --color=n app-editors/nano These are the packages that would be merged, in order: Calculating dependencies... done! * app-editors/nano Traceback (most recent call last): File "/usr/bin/emerge", line 51, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1054, in emerge_main return run_action(emerge_config) File "/usr/lib64/portage/pym/_emerge/actions.py", line 4066, in run_action emerge_config.args, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 442, in action_build mydepgraph.saveNomergeFavorites() File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 7928, in saveNomergeFavorites if self.query(prompt, enter_invalid) == "No": TypeError: query() missing 1 required positional argument: 'enter_invalid' When I downgrade back to portage-2.2.10, everything works fine again. Interesting... that does indeed trigger the issue for me. floppym@naomi ~ % grep tmux /var/lib/portage/world floppym@naomi ~ % sudo emerge --ignore-default-opts --ask --noreplace --color=n app-misc/tmux These are the packages that would be merged, in order: Calculating dependencies... done! * app-misc/tmux Traceback (most recent call last): File "/usr/bin/emerge", line 51, in <module> retval = emerge_main() File "/usr/lib/portage/pym/_emerge/main.py", line 1054, in emerge_main return run_action(emerge_config) File "/usr/lib/portage/pym/_emerge/actions.py", line 4066, in run_action emerge_config.args, spinner) File "/usr/lib/portage/pym/_emerge/actions.py", line 442, in action_build mydepgraph.saveNomergeFavorites() File "/usr/lib/portage/pym/_emerge/depgraph.py", line 7928, in saveNomergeFavorites if self.query(prompt, enter_invalid) == "No": TypeError: query() missing 1 required positional argument: 'enter_invalid' Created attachment 382194 [details, diff]
Use query function from UserQuery instance, not the class
This should fix it. It works for me.
Thank you Thomas for the detailed instructions to reproduce the error. Thank you Mike for reproducing and figuring out the source of the error. I missed seeing that error when I first looked at the code. I've commited a condensed version of the patch since self.uq was not needed anywhere. Patch is applied here: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2830df3b297f7caa84306316112d5485ad45b5b7 It is available now in portage-9999. I'll try to figure out portage's ebuild for how to apply that patch to a revision or will release again soon. *** Bug 519254 has been marked as a duplicate of this bug. *** *** Bug 519622 has been marked as a duplicate of this bug. *** *** Bug 519658 has been marked as a duplicate of this bug. *** Released in portage-2.2.12 |