So I've fixed it this way following an idea from Denix in #oe:

Set SRC_TARBALL_STASH_${PN} = "none" in the recipes where I want to
skip the try_mirror step and modified bitbake/lib/bb/fetch/__init__.py

diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 17fab8e..14e300e 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -461,6 +461,13 @@ class Fetch(object):

         pn = data.getVar('PN', d, True)
         src_tarball_stash = None
+
+        # Skip try_mirror if "none" is specified on a recipe basis
+        src_tarball_stash_pn = data.getVar('SRC_TARBALL_STASH_%s' %
pn, d, True)
+        if src_tarball_stash_pn == "none":
+            bb.msg.note(1, bb.msg.domain.Fetcher, "Skipping mirror")
+            return False
+
         if pn:
             src_tarball_stash = (data.getVar('SRC_TARBALL_STASH_%s' %
pn, d, True) or data.getVar('CVS_TARBALL_STASH_%s' % pn, d, True) or
data.getVar('SRC_TARBALL_STASH', d, True) or data.getVar(

It does the job but it's not scalable because I need to change all the
affected recipes...

Any thoughts from bitbake experts?

Regards,
Matthieu.

On Wed, Apr 8, 2009 at 9:35 AM, Matthieu Poullet
<[email protected]> wrote:
> Hi Mike,
>
> I'm rehosting at the moment all the tarballs the wget fetcher needs on
> an internal web server.
> The way to do it is to put:
>
> # Mirroring
> SOURCE_MIRROR_URL = "<yout_http_server>"
> INHERIT += "own-mirrors"
>
> in your local.conf. Then you can use wget to mirror for example
> http://www.angstrom-distribution.org/unstable/sources/
>
> It works well with all recipes using tarballs as sources, but not with
> recipes using git/svn/cvs... for that you need to set
> SRC_TARBALL_STASH, but as explained in my previous mail it's not
> flexible enough.
>
> See the openembedded/classes/own-mirrors.bbclass for reference.
>
> Regards,
> Matthieu
>
> On Wed, Apr 8, 2009 at 12:17 AM, Mike Turquette <[email protected]> wrote:
>> Forgot to copy the list.  Resending.
>>
>> On Tue, Apr 7, 2009 at 5:16 PM, Mike Turquette <[email protected]> wrote:
>>> On Tue, Apr 7, 2009 at 4:39 PM, Matthieu Poullet
>>> <[email protected]> wrote:
>>>> If I don't use tarballs at all, everytime I rebuild it, i must wait a
>>>> very long time until wget timeout and then fetches from the repo,
>>>> that's terrible too.
>>>>
>>>> What I'd like to have could be a list of IP addresses and/or domain
>>>> names which the fetchers check first and then bypass the try_mirror
>>>> step.
>>>
>>> I'm interested in this as well.  Internally I would also like to
>>> re-host ALL of the tarballs not just the ones from cvs, subversion,
>>> git, etc.  Anything fetched from wget and ftp basically.
>>>
>>> Matthieu, if I find the answer to your problem while looking into mine
>>> I'll let you know.
>>>
>>> Mike
>>>
>>
>
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to