Bug 549

Summary: Allow definining download mirrors easily in configuration
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Paul Eggleton <bluelightning>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: ke.yu, kevin.tian, poky.bs.watcher, poky.watcher, richard.purdie, sgw
Version: 0.9   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Paul Eggleton 2010-11-25 10:02:08 UTC
At the moment defining download mirror (PREMIRRORS) requires the use of a custom bbclass. Ideally this should be able to be configured more simply in local.conf.
Comment 1 Richard Purdie 2010-11-29 04:04:22 UTC
There is a syntax that can be used in conf files, see local.conf's example of SSTATE_MIRRORS. Perhaps this bug should be about documenting this format more widely?
Comment 2 Paul Eggleton 2010-12-20 10:21:06 UTC
I had another look at this. At the very least there is a need for further documentation on this option because it's easy to get "wrong". The two problems I had were:

(a) If you don't have a trailing \n in your PREMIRRORS then you get lots of "too many values to unpack while evaluating" errors at parse time. This could be fixed by adding an extra carriage return to the start of PREMIRRORS_append in poky.bbclass.

(b) Not defining the initial regex correctly resulting in completely broken mirror fetch URLs, e.g. for http it has to be http://.*/.*

I wonder if it would simply be easier to add a single mirror URL variable, which if defined would add mirror entries to the end of PREMIRRORS for all protocols? This would allow people to configure mirrors easily whilst still retaining the existing flexibility for those that need it.
Comment 3 Richard Purdie 2011-02-25 02:05:12 UTC
(a) at least has been fixed in master.
Comment 4 Paul Eggleton 2011-03-15 03:34:42 UTC
Commit 0dd3f7ccd170c in oe-core master addresses this, so I'm marking this issue as resolved.