# 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' ...without the "--ask", e.g. # emerge --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 >>> Recording sys-kernel/gentoo-sources:3.10.48 in "world" favorites file... works. Reproducible: Always # emerge --info Portage 2.2.11 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.15.8-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.15.8-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2 KiB Mem: 4043224 total, 2773736 free KiB Swap: 1048572 total, 1048572 free Timestamp of tree: Sat, 02 Aug 2014 18:15:01 +0000 ld GNU ld (GNU Binutils) 2.24 app-shells/bash: 4.2_p47 dev-lang/python: 2.7.8, 3.3.5-r1, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r2 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.14.1 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.8.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.15 (virtual/os-headers) sys-libs/glibc: 2.19-r1 ABI="amd64" ABI_X86="64" ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" ACCEPT_PROPERTIES="*" ACCEPT_RESTRICT="*" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-int el intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm aut hn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config log io mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ARCH="amd64" AUTOCLEAN="yes" BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_3 python_targets_python2_7 multilib" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core-avx-i -mno-movbe -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx2 -mno-lzcnt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic" CFLAGS_amd64="-m64" CFLAGS_x32="-mx32" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x32="x86_64-pc-linux-gnux32" CHOST_x86="i686-pc-linux-gnu" CLEAN_DELAY="5" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-act ive/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=core-avx-i -mno-movbe -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-t bm -mno-avx2 -mno-lzcnt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic " DEFAULT_ABI="amd64" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafile s ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown- features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GCC_SPECS="" IUSE_IMPLICIT="abi_x86_64 prefix" KERNEL="linux" LANG="en_US.UTF-8" MAKEOPTS="--jobs 6" MULTILIB_ABIS="amd64 x86"
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