[PATCH] option to prefer HTTP for downloads

Matthias Kaehlcke matthias@kaehlcke.net
Fri Apr 11 14:34:00 GMT 2008


El Fri, Apr 11, 2008 at 04:27:04PM +0200 Yann E MORIN ha dit:
> "Matthias Kaehlcke" <matthias@kaehlcke.net> wrote:
> > when trying to build a toolchain with crosstool-ng, the process
> > got stuck in the download of the kernel headers from the kernel.org
> > FTP server. i tried the same from another box in another network
> > without problems. i suppose that the firewall of the corporate network
> > is restricting the access to the FTP server.
> I have a pending change in my local tree that will add setting http_proxy
> and ftp_proxy in the environment for those using proxies. Also, using
> tsocks should be added as well...
> When you say "got stuck", did it really got stuck and nothing happened,
> or did the build failed?

exactly, it got stuck and nothing happened. later i switched on traces
and figured out where it hangs:

          => `linux-2.6.23.tar.bz2'
Resolving ftp.kernel.org...,
Connecting to ftp.kernel.org||:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ...

> > here is a small patch that adds the option to download the tarballs
> > preferably from HTTP servers.
> You mismatched spaces vs. tabs, but looks good. I will apply a slightly
> modified version of your patch with space fixes and something like the
> following here and there:
>   [ "${CT_PREFER_HTTP_DOWNLOAD}" = "y" ] && scheme=http || scheme=ftp
>   ...
>   CT_GetFile something "${scheme}://some.place/some/dir"
> That should be easier to maintain the list of URIs (no need to duplicate).
> Or we could simply try each scheme in turn, until one succeeds.

sounds good to me, i neither liked the redundant URLs in my patch :)


Matthias Kaehlcke
Embedded Linux Engineer

              La posibilidad de realizar un suenyo es lo
                 que hace que la vida sea interesante
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list