public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: crossgcc@sourceware.org
Cc: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Subject: Re: CT_PREFER_MIRROR working?
Date: Mon, 01 Aug 2011 17:08:00 -0000	[thread overview]
Message-ID: <201108011908.10429.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <F9C551623D2CBB4C9488801D14F864C604B427@ex-mb1.corp.adtran.com>

[-- Attachment #1: Type: Text/Plain, Size: 1699 bytes --]

Andy, All,

On Monday 01 August 2011 17:20:42 ANDY KENNEDY wrote:
> I select the following settings:
> 
> CT_USE_MIRROR=y
> CT_PREFER_MIRROR=y
> CT_MIRROR_BASE_URL="ftp://akennedy_lin/pub/dl"
> 
> with the expectation that for each package needed, the build will go
> look at that location (which _is_ a valid name in our network).
> Unfortunately, there seems to be "custom" downloads for eglibc.

Indeed, eglibc primarily fetches its sources via svn. It first looks in
the local tarballs dir to see if it was already retrieved, and if not,
reverts to using svn.

The mirror stuff is only for upstreams that provide tarballs.

> I
> modified the scripts to avoid that custom download if the
> MIRRO_BASE_URL is set, however, I was wondering if there is already a
> fix for this?

It might be possible to try the mirror for SVN as well. Care to try
the attached patch, please?

> Should _all_ packages attempt to download from the
> PREFER_MIRROR base if it is set?

That was not intended for all packages at first, as it seemed complex to
do so. But if the attached patch works as expected, then it was not that
complex, in fact.

It could be made to work for cvs (newlib) as well.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

[-- Attachment #2: ct-ng-1.12.0-svn-tries-mirror-first.patch --]
[-- Type: text/x-patch, Size: 825 bytes --]

diff --git a/scripts/functions b/scripts/functions
--- a/scripts/functions
+++ b/scripts/functions
@@ -556,6 +556,7 @@
     for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
         # Try all urls in turn
         for url in ${URLS}; do
+            [ -n "${url}" ] || continue
             CT_DoLog DEBUG "Trying '${url}/${file}${ext}'"
             CT_DoGetFile "${url}/${file}${ext}"
             if [ -f "${CT_TARBALLS_DIR}/${file}${ext}" ]; then
@@ -628,9 +629,11 @@
     local uri="$2"
     local rev="$3"
 
-    # Does it exist localy?
-    CT_GetLocal "${basename}" && return 0 || true
-    # No, it does not...
+    # First try locally, then the mirror
+    if CT_GetFile "${basename}"; then
+        # Got it! Return early! :-)
+        return 0
+    fi
 
     CT_DoLog EXTRA "Retrieving '${basename}'"
 


[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

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

  reply	other threads:[~2011-08-01 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 15:21 ANDY KENNEDY
2011-08-01 17:08 ` Yann E. MORIN [this message]
     [not found]   ` <F9C551623D2CBB4C9488801D14F864C604B493@ex-mb1.corp.adtran.com>
2011-08-01 18:37     ` Yann E. MORIN
2011-08-01 19:24       ` ANDY KENNEDY
2011-08-01 19:44         ` Yann E. MORIN
2011-08-02 17:35           ` ANDY KENNEDY
2011-08-02 18:43             ` Yann E. MORIN
2011-08-02 18:51               ` ANDY KENNEDY
2011-08-02 20:39                 ` Yann E. MORIN
2011-08-02 21:26                   ` ANDY KENNEDY
2011-08-02 21:20                     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108011908.10429.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=ANDY.KENNEDY@adtran.com \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).