From: "Mark Hatle" <mark.hatle@kernel.crashing.org>
To: Quentin Schulz <quentin.schulz@streamunlimited.com>,
Dawod <mhm.dawod@gmail.com>
Cc: openembedded-core@lists.openembedded.org, yocto@yoctoproject.org
Subject: Re: [oe][yocto][bitbake] Fetching source using different protocols
Date: Mon, 11 May 2020 13:37:43 -0500 [thread overview]
Message-ID: <e183edd5-cea8-8870-eef3-2d3b7ecbc05a@kernel.crashing.org> (raw)
In-Reply-To: <20200511091703.l53b4t74xc36vgdo@qschulz>
On 5/11/20 4:17 AM, Quentin Schulz wrote:
> Hi Mohamed,
>
> On Mon, May 11, 2020 at 11:03:26AM +0200, Dawod wrote:
>> Hello,
>>
>> I need to fetch a git repo using 2 different protocols ( ssh & https )
>> So that when I run bitbake, It will fetch using ssh protocol first and if
>> it fails to fetch, It will try to fetch using https protocol.
>>
>
> Why? What's the exact use case?
>
>> can I do some thing like that or I will have to change it manually every
>> time ?
>>
>
> Maybe you could play with PREMIRROS? (I've never explicitly used that
> variable though):
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS
This is what I would suggest. Have the recipe itself set the fallback URI as
the main URL.
SRC_URI = "git://example.com/my/repository/uri;proto=https"
PREMIRRORS_prepend = "git://example.com/my/repository/uri;proto=https
git://example.com/my/otherrepo/uri;proto=ssh \n"
(the \n is literally '\' and 'n')
The above should, when it sees the SRC_URI, try the ssh protocol first.. if that
doesn't work it will fall back to SRC_URI.
--Mark
> I guess the asterisk parts could be removed and the path to more or less your
> source could be used (ssh first, to http path in your SRC_URI)?
>
> That's a shot in the dark for me but something to test I'd say :)
>
> Quentin
>
>
>
>
next prev parent reply other threads:[~2020-05-11 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 9:03 [oe][yocto][bitbake] Fetching source using different protocols Dawod
2020-05-11 9:17 ` Quentin Schulz
2020-05-11 18:37 ` Mark Hatle [this message]
2020-05-12 10:25 ` Dawod
2020-05-11 9:20 ` [OE-core] " Andre McCurdy
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=e183edd5-cea8-8870-eef3-2d3b7ecbc05a@kernel.crashing.org \
--to=mark.hatle@kernel.crashing.org \
--cc=mhm.dawod@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=quentin.schulz@streamunlimited.com \
--cc=yocto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox