All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Yu Ke <ke.yu@intel.com>
Cc: poky@yoctoproject.org
Subject: Re: PREMIRRORS in yocto, do they actually work?
Date: Fri, 14 Jan 2011 15:05:57 -0700	[thread overview]
Message-ID: <4D30C8C5.3060803@mlbassoc.com> (raw)
In-Reply-To: <20110107075508.GG20168@kyu3-hedt>

On 01/07/2011 12:55 AM, Yu Ke wrote:
> On Jan 06, 08:06, Gary Thomas wrote:
>> On 01/06/2011 12:14 AM, Yu Ke wrote:
>>> On Jan 02, 10:15, Gary Thomas wrote:
>>>> On 01/02/2011 10:08 AM, Koen Kooi wrote:
>>>>> Hi,
>>>>>
>>>>> I would like to have the fetchter try my PREMIRROS first before trying to fetch from git. In OE I have the following in a bbclass:
>>>>>
>>>>> PREMIRRORS_append () {
>>>>> git://.*/.* http://www.angstrom-distribution.org/unstable/sources/
>>>>> }
>>>>>
>>>>> When used in OE that works, but in yocto it doesn't. So I tried to do it poky style in a .inc:
>>>>>
>>>>> PREMIRRORS_append = "\
>>>>> git://.*/.*   http:/www.angstrom-distribution.org/sources/ \n"
>>>>>
>>>>> Which also doesn't work since it doesn't try to fetch from there, but it does mention "http:/www.angstrom-distribution.org/sources/" in the fetch error message when git read-tree fails.
>>>>>
>>>>> So my question: how do I make it work in yocto like it works in OE?
>>>>
>>>> I too have been struggling with this as I'd like to have
>>>> a local repository to hold the current source set.  Sadly,
>>>> as you've observed, it doesn't work, at least not as expected.
>>>
>>> I've tried to use file:///some/dir as PREMIRROR, and found it does has issue. The main reason is that the local.py fetcher does not do real copy in go() method. Although it make sense in normal fetch case, it does cause trouble in try_mirror() case.
>>>
>>> I don't have simple idea to address this issue yet and I will take care of it in the coming fetcher change. As a quick workaround, could you try this approach: use http://local/some/dir as PREMIRROR? e.g. if you use /opt/source as mirror, you can add to meta/conf/distro/poky.conf:
>>> PREMIRRORS_append = "\
>>> git://.*/.*   http://local/opt/source/ \n \
>>> svn://.*/.*   http://local/opt/source/ \n \
>>> ...
>>> "
>>>
>>> in this case, wget.py fetcher will be used, and it works fine in try_mirror() case. Also the /opt/source can be read-only.
>>
>> Per my example, I set both PREMIRRORS and MIRRORS to use these paths.
>>
>> This _works_ (in that it doesn't fail), but it doesn't always
>> seem to use my local MIRROR copy.  After an abreviated build from
>> scratch, I found that these files _were_ copied from my local
>> MIRROR:
>>    automake-1.11.1.tar.bz2
>>    m4-1.4.15.tar.gz
>>    autoconf-2.65.tar.bz2
>>    libtool-2.4.tar.gz
>>    ncurses-5.4.tar.gz
>>    gdbm-1.8.3.tar.gz
>>    gzip-1.4.tar.gz
>>    readline-6.1.tar.gz
>>    gmp-5.0.1.tar.bz2
>>    bison-2.4.3.tar.gz
>>    gettext-0.17.tar.gz
>>    binutils-2.20.1.tar.bz2
>>
>> but these were [re]fetched over the network from their original
>> sources (my MIRROR does have local copies):
>>    db-4.2.52.tar.gz
>>    expat-2.0.1.tar.gz
>>    flex-2.5.35.tar.bz2
>>    perl-5.8.8.tar.gz
>>    quilt-0.48.tar.gz
>>    zlib-1.2.5.tar.bz2
>>    mpc-0.8.2.tar.gz
>>    pkg-config-0.25.tar.gz
>>    mpfr-3.0.0.tar.bz2
>>    elfutils-0.148.tar.bz2
>>    tcl8.5.9-src.tar.gz
>>    config_cvs.sv.gnu.org__20080123.tar.gz
>>    curl-7.21.2.tar.bz2
>>    linux-2.6.36.tar.bz2
>>    git-1.7.3.2.tar.bz2
>>    sqlite-3.7.3.tar.gz
>>    openssl-0.9.8p.tar.gz
>>    git_github.com.wrpseudo.pseudo.git_c9792c7acdb1cac90549ff08db12a8bf0c53cdcf.tar.gz
>>
>> Not quite what I was hoping for.  I don't mind getting a
>> [temporary] copy of the files into ${BUILD}/downloads, but
>> I really need to find a way to avoid ever going to the internet
>> if the file is already available (which I plan to guarantee
>> for my customers)
>
> yes, It is unexpected. After digging more, I find meta/classes/mirrors.bbclass also provide some internet mirror, and bitbake may use them for fetching from internet. So could you remove those mirrors and have a quick try? This somehow does not explain why bitbake ignore PREMIRROR, so there must be wrong somewhere else. I am still looking. Will send out if there is more finding.

Any progress on this?  I just tried my original (file://)
setup with the latest master that has fetch2 enabled and
it still fails miserably.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


  reply	other threads:[~2011-01-14 22:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 17:08 PREMIRRORS in yocto, do they actually work? Koen Kooi
2011-01-02 17:15 ` Gary Thomas
2011-01-06  7:14   ` Yu Ke
2011-01-06  7:39     ` Frans Meulenbroeks
2011-01-06 11:07       ` Yu Ke
2011-01-06 12:08         ` Frans Meulenbroeks
2011-01-06 15:06     ` Gary Thomas
2011-01-07  7:55       ` Yu Ke
2011-01-14 22:05         ` Gary Thomas [this message]
2011-01-02 17:15 ` Koen Kooi
     [not found] ` <1293990824.18787.428.camel@eha>
2011-01-02 19:01   ` Koen Kooi
2011-01-06  7:00     ` Yu Ke
2011-01-06  7:18       ` Koen Kooi
2011-01-06 10:22         ` Yu Ke

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=4D30C8C5.3060803@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=ke.yu@intel.com \
    --cc=poky@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.