[yocto] PREMIRROR
Rudolf J Streif
rudolf.streif at ibeeto.com
Wed Jul 24 11:57:14 PDT 2019
Hi Russell,
devtool and eSDK are different things. The purpose of PREMIRRORS is to
set a mirror for all recipes. It's a way for organizations to control
where their YP builds download sources from. It's not intended to be
used for a single recipe. There is no need for that. You simply set
SRC_URI in your recipe to your local git repo. That is what devtool does
after downloading the sources from a remote repo. If you already have
the remote repo cloned locally you can just point devtool to it.
You can do it manually by creating your recipe and setting SRC_URI like
this:
SRC_URI = "git:///local/path/${PN};protocol=file"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
PREMIRRORS is only relevant for do_fetch not for do_unpack.
:rjs
On 7/24/19 11:28 AM, Russell Peterson wrote:
> Hi, Rudolf.
>
> Thanks for the reply. Yes, I am aware of the eSDK functionality,
> however, I have some unique requirements that I am trying to work
> around. Regardless... what I am doing should work, no? I simply want
> to use a local git repo (the directory itself hence protocol=file)
> instead of what the recipe specifies. Looks like the fetch is working
> but the do_unpack task is ignoring PREMIRRORS (or at least the
> localpath variable seems wrong).
>
> --Russ
>
>
> On Wed, Jul 24, 2019 at 12:19 PM Rudolf J Streif
> <rudolf.streif at ibeeto.com <mailto:rudolf.streif at ibeeto.com>> wrote:
>
> Russell,
>
> You don't need PREMIRROR for this functionality. It's not exactly
> intended for that use.
>
> The simplest way to achieve what you are looking for is to use
> devtool. If I understand you correctly you are downloading sources
> from a remote repo on GitHub but want to have them locally to make
> modifications? If so use:
>
> devtool add myrecipe localsrc fetchuri
>
> from your build environment (you have to source oe-init-build-env
> first). devtool then fetches the source from fetchuri into a
> directory localsrc as a git repo and automatically creates the
> recipe for it.
>
> :rjs
>
>
> On 7/23/19 1:49 PM, Russell Peterson wrote:
>> Hello,
>>
>> I am looking to have bitbake pick up files for a particular
>> recipe from a local git repository using the PREMIRROR functionality.
>>
>> Basically, the recipe (bb file) points to github but in my local
>> build I add PREMIRROR_prepend = "git://.*/.*
>> git:///local/path/BASENAME;protocol=file\n"
>>
>> I will probably make the git regular expression more exact for my
>> specific github repo but this works for now.
>>
>> This all works (as I deleted the github download from the local
>> download directory) because I can see in the do_fetch log and the
>> correct (local) repo was found and placed in the DL_DIR.
>>
>> Problem is, do_unpack fails because it appears to be looking for
>> the original (github) SRC_URI. Then it complains about "no up to
>> date source found: clone or directory not available or not up to
>> date (shallow clone not enabled)"
>>
>> Any help on what I am missing would be appreciated.
>>
>> Regards,
>>
>> Russell
>>
>>
>>
> --
> -----
> Rudolf J Streif
> CEO/CTO ibeeto
> +1.855.442.3396 x700
>
--
-----
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190724/cebbf7c4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190724/cebbf7c4/attachment-0001.pgp>
More information about the yocto
mailing list