Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
curl cannot resolve hosts when running in emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 314

PostPosted: Sat Apr 03, 2021 12:53 am    Post subject: curl cannot resolve hosts when running in emerge Reply with quote

Hi,

I write a simple ebuild which just download their tarball and run "make all". The "ebuild ... install" command works without any error and create the correct file layout in the "image" directory.

But when I try to emerge the package to my live system, I got "curl: (6) Could not resolve host: github.com" constantly. Even it occasionally got resolved, the download will be interrupted and fail.

The "curl" command is NOT issued by the ebuild, but by the "Makefile" from the tarball. I wonder if gentoo has any restriction on running "curl" during emerge.

By the way, my host system can access the network normally. So I don't think it is my host network issue.
_________________
David Shen
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sat Apr 03, 2021 1:24 am    Post subject: Reply with quote

Please post the output of
Code:

cat /etc/resolv.conf
cat /etc/nsswitch.conf
dig @<your-nameserver> github.com

_________________
:)
Back to top
View user's profile Send private message
halcon
l33t
l33t


Joined: 15 Dec 2019
Posts: 629

PostPosted: Sat Apr 03, 2021 1:43 am    Post subject: Re: curl cannot resolve hosts when running in emerge Reply with quote

davidshen84 wrote:
I wonder if gentoo has any restriction on running "curl" during emerge.

Yes, there are restrictions for curl, wget and all the programs alike. Everything should be downloaded via the standard ebuild means (SRC_URI etc). It was discussed on the forum some months earlier.
_________________
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Sat Apr 03, 2021 4:02 pm    Post subject: Reply with quote

This is a defect in the upstream build system. It should not be downloading anything as part of make. You may be able to discourage it from doing this with a configuration parameter or by having the ebuild arrange for the required dependencies to be available before calling emake.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum