Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
dwardo
n00b
n00b
User avatar
Posts: 63
Joined: Wed Nov 10, 2004 10:07 am
Location: France

In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by dwardo » Fri Apr 03, 2026 8:48 pm

I'm trying to debug a weird behavior of portage

My laptop has my desktop as bin host since a few months and everything was working fine...

This weird behavior appeared 1 or 2 weeks ago...

When I try to emerge a package on the laptop it fails saying

Code: Select all

>>> Emerging binary (1 of 1) app-arch/xz-utils-5.8.3::gentoo
ssh: Could not resolve hostname vi: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(232) [Receiver=3.4.1]
hostname vi ????? my bin host is not called vi !!!

So To debug this I'd like to start from the python file where the "ssh vi" is being called to retrieve the binpkg and do some print(...) to figure out what is happening...

Any hints welcome.
Top
grknight
Retired Dev
Retired Dev
Posts: 2568
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Fri Apr 03, 2026 10:49 pm

rsync uses ssh by default. So the real question is: what does emerge --info --verbose say?

Edit, added --verbose for FETCHCOMMAND and related variables to appear
Top
Banana
Administrator
Administrator
User avatar
Posts: 2400
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

Re: In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by Banana » Sat Apr 04, 2026 7:08 am

ssh: Could not resolve hostname vi: Name or service not known
is "vi" a hostname in your network or do you have a typo in any of your /etc/portage files?
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
dwardo
n00b
n00b
User avatar
Posts: 63
Joined: Wed Nov 10, 2004 10:07 am
Location: France

Re: In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by dwardo » Sat Apr 04, 2026 8:48 am

vi was not a hostname on my network
vi was nowhere in /etc/portage/make.conf

Found the culprit :-(

I had commented out by error the

Code: Select all

[[ $- != *i* ]] && return
in my ~/.bashrc file... and evidently something was poluting a non interactive shell during the rsync and ssh to retrieve the binpkgs...

I'm guessing the something was one of

Code: Select all

set editing-mode vi
set keymap vi

because that was the only vi in my .bashrc !
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

Re: In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by Hu » Sat Apr 04, 2026 2:01 pm

dwardo wrote: Sat Apr 04, 2026 8:48 amI'm guessing the something was one of

Code: Select all

set editing-mode vi
set keymap vi

because that was the only vi in my .bashrc !
Do you have those lines in your .bashrc as written? If so, they are wrong. Those look like reasonable lines for a .inputrc to configure readline. If run in a bashrc, they will invoke the bash builtin set, to change $@ first to be 1=editing-mode 2=vi, then 1=keymap 2=vi. This is at best useless, since it will not affect readline. At worst, it will break any use of positional parameters that were passed to the invoked shell, such as the one from FETCHCOMMAND_SSH, which expects $2 to be a hostname:

Code: Select all

FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
Although using positional parameters in an interactive shell is rare, you should still fix this properly, by moving those lines to .inputrc (or just delete them, since they did not work as written, and you apparently have never missed them).

[Edit: fixed spelling of filename, as Banana pointed out that one of the two instances was wrong.]
Top
Banana
Administrator
Administrator
User avatar
Posts: 2400
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

Re: In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by Banana » Sat Apr 04, 2026 2:48 pm

More information about what Hu already said and a correction: It is .inputrc. Hu missed a t.

https://tiswww.case.edu/php/chet/readline/readline.html
-> 1.3 Readline Init File and 1.3.1 Readline Init File Syntax
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
dwardo
n00b
n00b
User avatar
Posts: 63
Joined: Wed Nov 10, 2004 10:07 am
Location: France

Re: In which .py does portage fetch binpkgs from PORTAGE_BINHOST when emerging a package ?

  • Quote

Post by dwardo » Sat Apr 04, 2026 9:59 pm

Thank you for the insight. I've transfered the 2 lines to .inputrc !

They had been there for a couple of years !
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic