[poky] PREMIRRORS in yocto, do they actually work?
Frans Meulenbroeks
fransmeulenbroeks at gmail.com
Wed Jan 5 23:39:47 PST 2011
2011/1/6 Yu Ke <ke.yu at intel.com>:
> 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.
>
> Regards
> Ke
Thanks for the info Ke.
One additional question on this topic.
is it also possible to block fetching from the original source?
I'm looking for an easy, automated way to verify that all sources for
our products are indeed on our public server (to verify GPL
compliance).
Frans
More information about the poky
mailing list