wanting to verify best way to set up a local source mirror
we had a recent discussion on the yocto ML about this and i'd like
to confirm the best way to define a local source mirror.
currently, the bitbake manual (chapter 3), discusses how to set up
something like that,
PREMIRRORS ?= "\
bzr://.*/.* http://somemirror.org/sources/ \n \ cvs://.*/.* http://somemirror.org/sources/ \n \ git://.*/.* http://somemirror.org/sources/ \n \ hg://.*/.* http://somemirror.org/sources/ \n \ osc://.*/.* http://somemirror.org/sources/ \n \ p4://.*/.* http://somemirror.org/sources/ \n \ svk://.*/.* http://somemirror.org/sources/ \n \ svn://.*/.* http://somemirror.org/sources/ \n"
in my case, i have a directory of tarballs i've collected over the
years that i want to take advantage of, and i was using this in my local.conf file:
PREMIRRORS_prepend = "\git://.*/.* file:///home/rpjday/dl/ \n \
svn://.*/.* file:///home/rpjday/dl/ \n \
cvs://.*/.* file:///home/rpjday/dl/ \n \
ftp://.*/.* file:///home/rpjday/dl/ \n \
http://.*/.* file:///home/rpjday/dl/ \n \
https://.*/.* file:///home/rpjday/dl/ \n"
which was kind of tedious but it seemed to work fine.
however, gary thomas suggested the following instead (which is way
nicer):
SOURCE_MIRROR_URL ?= "file:///home/rpjday/dl/"
INHERIT += "own-mirrors"BB_GENERATE_MIRROR_TARBALLS = "1"
# BB_NO_NETWORK = "1"
which makes sense given this from meta/classes/own-mirrors.bbclass in oe-core:
REMIRRORS() {
cvs://.*/.* ${SOURCE_MIRROR_URL}
svn://.*/.* ${SOURCE_MIRROR_URL}
git://.*/.* ${SOURCE_MIRROR_URL}
hg://.*/.* ${SOURCE_MIRROR_URL}
bzr://.*/.* ${SOURCE_MIRROR_URL}
svk://.*/.* ${SOURCE_MIRROR_URL}
p4://.*/.* ${SOURCE_MIRROR_URL}
osc://.*/.* ${SOURCE_MIRROR_URL}https?$://.*/.* ${SOURCE_MIRROR_URL}
ftp://.*/.* ${SOURCE_MIRROR_URL}
}
so i would think that the bitbake manual could be updated to refer to this cleaner solution, as long as it works the way i think it does. is there anything else that could be said about using the own-mirrors class that a reader might want to know?
rday
Signature · 7 lines
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================Quoted 51 lines · Robert P. J. Day
we had a recent discussion on the yocto ML about this and i'd like
to confirm the best way to define a local source mirror.currently, the bitbake manual (chapter 3), discusses how to set up
something like that,PREMIRRORS ?= "\
bzr://.*/.* http://somemirror.org/sources/ \n \ cvs://.*/.* http://somemirror.org/sources/ \n \ git://.*/.* http://somemirror.org/sources/ \n \ hg://.*/.* http://somemirror.org/sources/ \n \ osc://.*/.* http://somemirror.org/sources/ \n \ p4://.*/.* http://somemirror.org/sources/ \n \ svk://.*/.* http://somemirror.org/sources/ \n \ svn://.*/.* http://somemirror.org/sources/ \n"in my case, i have a directory of tarballs i've collected over the
years that i want to take advantage of, and i was using this in my local.conf file:
PREMIRRORS_prepend= "\git://.*/.*file:///home/rpjday/dl/ \n \
svn://.*/.* file:///home/rpjday/dl/ \n \
cvs://.*/.* file:///home/rpjday/dl/ \n \
ftp://.*/.* file:///home/rpjday/dl/ \n \
http://.*/.* file:///home/rpjday/dl/ \n \
https://.*/.* file:///home/rpjday/dl/ \n"which was kind of tedious but it seemed to work fine.
however, gary thomas suggested the following instead (which is way
nicer):
SOURCE_MIRROR_URL?= "file:///home/rpjday/dl/"
INHERIT += "own-mirrors"BB_GENERATE_MIRROR_TARBALLS= "1"
#BB_NO_NETWORK= "1"which makes sense given this from meta/classes/own-mirrors.bbclass in oe-core:
REMIRRORS(){cvs://.*/.* ${SOURCE_MIRROR_URL} svn://.*/.* ${SOURCE_MIRROR_URL} git://.*/.* ${SOURCE_MIRROR_URL} hg://.*/.* ${SOURCE_MIRROR_URL} bzr://.*/.* ${SOURCE_MIRROR_URL} svk://.*/.* ${SOURCE_MIRROR_URL} p4://.*/.* ${SOURCE_MIRROR_URL} osc://.*/.* ${SOURCE_MIRROR_URL}
Quoted 8 lines
https?$://.*/.* ${SOURCE_MIRROR_URL}
ftp://.*/.* ${SOURCE_MIRROR_URL}
}so i would think that the bitbake manual could be updated to refer to this cleaner solution, as long as it works the way i think it does. is there anything else that could be said about using the own-mirrors class that a reader might want to know?
You are confusing bibbake manual with metadata - bitbake doesn't come with own-mirrors class.
Signature · 1 line
Denys