All of lore.kernel.org
 help / color / mirror / Atom feed
* Sub-directories from Git in SRC-URI
@ 2017-04-11  6:24 Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  7:57 ` Esponde, Joel
  2017-04-11 16:37 ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Eswaran Vinothkumar (BEG/PJ-IOT-EL) @ 2017-04-11  6:24 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

Hallo,

May I now is it possible to include a sub-directory from git repo in the SRC_URI of bitbake recipe.

Also in SRC_URI is it possible to include a directory instead of a single file?

I know I could create a tar file of a directory and include it , but I would like to know is it possible to include directory as a SRC_URI.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1



[-- Attachment #2: Type: text/html, Size: 3477 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sub-directories from Git in SRC-URI
  2017-04-11  6:24 Sub-directories from Git in SRC-URI Eswaran Vinothkumar (BEG/PJ-IOT-EL)
@ 2017-04-11  7:57 ` Esponde, Joel
  2017-04-11  8:04   ` Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11 16:37 ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Esponde, Joel @ 2017-04-11  7:57 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL), yocto

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Hi,

Here is one way to manage this use case.
In the SRC_URI variable, you set the git repo access.
Now let's say that your sub-directory relative path is "src/myapp".
Son now you just have to add to your recipe this line:

S = "${WORKDIR}/git/src/myapp"

It is not optimized from a disk usage point of view (a full copy of the repo files is in ${WORKDIR}/git) but it works.

Regards,

Joël Esponde
Honeywell | Safety and Productivity Solutions

De : yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] De la part de Eswaran Vinothkumar (BEG/PJ-IOT-EL)
Envoyé : mardi 11 avril 2017 08:25
À : yocto@yoctoproject.org
Objet : [yocto] Sub-directories from Git in SRC-URI

Hallo,

May I now is it possible to include a sub-directory from git repo in the SRC_URI of bitbake recipe.

Also in SRC_URI is it possible to include a directory instead of a single file?

I know I could create a tar file of a directory and include it , but I would like to know is it possible to include directory as a SRC_URI.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1


[-- Attachment #2: Type: text/html, Size: 5952 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sub-directories from Git in SRC-URI
  2017-04-11  7:57 ` Esponde, Joel
@ 2017-04-11  8:04   ` Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  8:31     ` Miguel Aveiro
  2017-04-11 13:51     ` Esponde, Joel
  0 siblings, 2 replies; 6+ messages in thread
From: Eswaran Vinothkumar (BEG/PJ-IOT-EL) @ 2017-04-11  8:04 UTC (permalink / raw)
  To: Esponde, Joel, yocto

[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]

Hi,

Thanks for your answer. I had thought about using this solution initially. In my case I have a common git repo for some 20 different applications and planning to write an individual recipe for each application.

If I plan to use in this way, I have 20 copies in my disk which I don't want to have.

Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1

Von: Esponde, Joel [mailto:Joel.Esponde@Honeywell.com]
Gesendet: Dienstag, 11. April 2017 09:58
An: Eswaran Vinothkumar (BEG/PJ-IOT-EL) <Vinothkumar.Eswaran@de.bosch.com>; yocto@yoctoproject.org
Betreff: RE: Sub-directories from Git in SRC-URI

Hi,

Here is one way to manage this use case.
In the SRC_URI variable, you set the git repo access.
Now let's say that your sub-directory relative path is "src/myapp".
Son now you just have to add to your recipe this line:

S = "${WORKDIR}/git/src/myapp"

It is not optimized from a disk usage point of view (a full copy of the repo files is in ${WORKDIR}/git) but it works.

Regards,

Joël Esponde
Honeywell | Safety and Productivity Solutions

De : yocto-bounces@yoctoproject.org<mailto:yocto-bounces@yoctoproject.org> [mailto:yocto-bounces@yoctoproject.org] De la part de Eswaran Vinothkumar (BEG/PJ-IOT-EL)
Envoyé : mardi 11 avril 2017 08:25
À : yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Objet : [yocto] Sub-directories from Git in SRC-URI

Hallo,

May I now is it possible to include a sub-directory from git repo in the SRC_URI of bitbake recipe.

Also in SRC_URI is it possible to include a directory instead of a single file?

I know I could create a tar file of a directory and include it , but I would like to know is it possible to include directory as a SRC_URI.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1



[-- Attachment #2: Type: text/html, Size: 8377 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sub-directories from Git in SRC-URI
  2017-04-11  8:04   ` Eswaran Vinothkumar (BEG/PJ-IOT-EL)
@ 2017-04-11  8:31     ` Miguel Aveiro
  2017-04-11 13:51     ` Esponde, Joel
  1 sibling, 0 replies; 6+ messages in thread
From: Miguel Aveiro @ 2017-04-11  8:31 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2652 bytes --]

Hi,

You might want to take a look at bitbake's documentation:

https://www.yoctoproject.org/docs/2.0/bitbake-user-manual/bitbake-user-manual.html#gitsm-fetcher

It actually has a git submodules fetcher (gitsm://). I haven't used it, but
it should be straightforward.

Regards,
Miguel Aveiro

On 11 April 2017 at 09:04, Eswaran Vinothkumar (BEG/PJ-IOT-EL) <
Vinothkumar.Eswaran@de.bosch.com> wrote:

> Hi,
>
>
>
> Thanks for your answer. I had thought about using this solution initially.
> In my case I have a common git repo for some 20 different applications and
> planning to write an individual recipe for each application.
>
>
>
> If I plan to use in this way, I have 20 copies in my disk which I don’t
> want to have.
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
>
> *Vinothkumar Eswaran BEG-PT/PJ-IOT1 *
>
> *Von:* Esponde, Joel [mailto:Joel.Esponde@Honeywell.com]
> *Gesendet:* Dienstag, 11. April 2017 09:58
> *An:* Eswaran Vinothkumar (BEG/PJ-IOT-EL) <Vinothkumar.Eswaran@de.bosch.
> com>; yocto@yoctoproject.org
> *Betreff:* RE: Sub-directories from Git in SRC-URI
>
>
>
> Hi,
>
>
>
> Here is one way to manage this use case.
>
> In the SRC_URI variable, you set the git repo access.
>
> Now let’s say that your sub-directory relative path is “src/myapp”.
>
> Son now you just have to add to your recipe this line:
>
>
>
> S = "${WORKDIR}/git/src/myapp"
>
>
>
> It is not optimized from a disk usage point of view (a full copy of the
> repo files is in ${WORKDIR}/git) but it works.
>
>
>
> Regards,
>
>
>
> *Joël Esponde*
>
> *Honeywell* | Safety and Productivity Solutions
>
>
>
> *De :* yocto-bounces@yoctoproject.org [mailto:yocto-bounces@
> yoctoproject.org <yocto-bounces@yoctoproject.org>] *De la part de*
> Eswaran Vinothkumar (BEG/PJ-IOT-EL)
> *Envoyé :* mardi 11 avril 2017 08:25
> *À :* yocto@yoctoproject.org
> *Objet :* [yocto] Sub-directories from Git in SRC-URI
>
>
>
> Hallo,
>
>
>
> May I now is it possible to include a sub-directory from git repo in the
> SRC_URI of bitbake recipe.
>
>
>
> Also in SRC_URI is it possible to include a directory instead of a single
> file?
>
>
>
> I know I could create a tar file of a directory and include it , but I
> would like to know is it possible to include directory as a SRC_URI.
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
> *Vinothkumar Eswaran BEG-PT/PJ-IOT1*
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #2: Type: text/html, Size: 8109 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sub-directories from Git in SRC-URI
  2017-04-11  8:04   ` Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  8:31     ` Miguel Aveiro
@ 2017-04-11 13:51     ` Esponde, Joel
  1 sibling, 0 replies; 6+ messages in thread
From: Esponde, Joel @ 2017-04-11 13:51 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL), yocto

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

Following Miguel Aveiro's link, I noticed a parameter called subpath that I had never see:
https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#git-fetcher
This parameter may provide you the feature you are looking for.

Joël Esponde
Honeywell | Safety and Productivity Solutions

De : Eswaran Vinothkumar (BEG/PJ-IOT-EL) [mailto:Vinothkumar.Eswaran@de.bosch.com]
Envoyé : mardi 11 avril 2017 10:04
À : Esponde, Joel <Joel.Esponde@Honeywell.com>; yocto@yoctoproject.org
Objet : AW: Sub-directories from Git in SRC-URI

Hi,

Thanks for your answer. I had thought about using this solution initially. In my case I have a common git repo for some 20 different applications and planning to write an individual recipe for each application.

If I plan to use in this way, I have 20 copies in my disk which I don't want to have.

Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1
Von: Esponde, Joel [mailto:Joel.Esponde@Honeywell.com]
Gesendet: Dienstag, 11. April 2017 09:58
An: Eswaran Vinothkumar (BEG/PJ-IOT-EL) <Vinothkumar.Eswaran@de.bosch.com<mailto:Vinothkumar.Eswaran@de.bosch.com>>; yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Betreff: RE: Sub-directories from Git in SRC-URI

Hi,

Here is one way to manage this use case.
In the SRC_URI variable, you set the git repo access.
Now let's say that your sub-directory relative path is "src/myapp".
Son now you just have to add to your recipe this line:

S = "${WORKDIR}/git/src/myapp"

It is not optimized from a disk usage point of view (a full copy of the repo files is in ${WORKDIR}/git) but it works.

Regards,

Joël Esponde
Honeywell | Safety and Productivity Solutions

De : yocto-bounces@yoctoproject.org<mailto:yocto-bounces@yoctoproject.org> [mailto:yocto-bounces@yoctoproject.org] De la part de Eswaran Vinothkumar (BEG/PJ-IOT-EL)
Envoyé : mardi 11 avril 2017 08:25
À : yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Objet : [yocto] Sub-directories from Git in SRC-URI

Hallo,

May I now is it possible to include a sub-directory from git repo in the SRC_URI of bitbake recipe.

Also in SRC_URI is it possible to include a directory instead of a single file?

I know I could create a tar file of a directory and include it , but I would like to know is it possible to include directory as a SRC_URI.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1


[-- Attachment #2: Type: text/html, Size: 10398 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sub-directories from Git in SRC-URI
  2017-04-11  6:24 Sub-directories from Git in SRC-URI Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  7:57 ` Esponde, Joel
@ 2017-04-11 16:37 ` Khem Raj
  1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2017-04-11 16:37 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL); +Cc: yocto

On Mon, Apr 10, 2017 at 11:24 PM, Eswaran Vinothkumar (BEG/PJ-IOT-EL)
<Vinothkumar.Eswaran@de.bosch.com> wrote:
> Hallo,
>
>
>
> May I now is it possible to include a sub-directory from git repo in the
> SRC_URI of bitbake recipe.
>
>
>
> Also in SRC_URI is it possible to include a directory instead of a single
> file?
>
>
>
> I know I could create a tar file of a directory and include it , but I would
> like to know is it possible to include directory as a SRC_URI.
>

if you have a setup where you checkout this component yourself e.g.
using android repo or gitsm to manage your yocto setup then you can
simply point your recipes to use file:// fetcher or even resort to
externalsrc to build in recipes where you point S to this common
directory for multiple recipes. I for one however like to defer the
fetching to bitbake in that case it will really fetch your component
once but will make copies locally for each component it builds. It may
not be as bad now a days with shared state and if the components are
not built so often its only a occasional thing.

>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
> Vinothkumar Eswaran
> BEG-PT/PJ-IOT1
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-11 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11  6:24 Sub-directories from Git in SRC-URI Eswaran Vinothkumar (BEG/PJ-IOT-EL)
2017-04-11  7:57 ` Esponde, Joel
2017-04-11  8:04   ` Eswaran Vinothkumar (BEG/PJ-IOT-EL)
2017-04-11  8:31     ` Miguel Aveiro
2017-04-11 13:51     ` Esponde, Joel
2017-04-11 16:37 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.