public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 0/1] one commit to make kernel repo change easy
@ 2013-01-16 19:46 nitin.a.kamble
  2013-01-16 19:46 ` [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI nitin.a.kamble
  0 siblings, 1 reply; 9+ messages in thread
From: nitin.a.kamble @ 2013-01-16 19:46 UTC (permalink / raw)
  To: Openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

Here is a commit to make changing of the the linux-yocto v3.4 kernel repository
easy.

Thanks,
Nitin

The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:

  oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib nitin/misc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
  linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

 meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

-- 
1.7.3.4




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

* [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-16 19:46 [PATCH 0/1] one commit to make kernel repo change easy nitin.a.kamble
@ 2013-01-16 19:46 ` nitin.a.kamble
  2013-01-18 17:18   ` Saul Wold
  0 siblings, 1 reply; 9+ messages in thread
From: nitin.a.kamble @ 2013-01-16 19:46 UTC (permalink / raw)
  To: Openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your
own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-3.4.git/;protocol=file"

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
index 70ed967..92129b6 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
 SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
 SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-3.4.git;protocol=git"
+SRC_URI = "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
 
 LINUX_VERSION ?= "3.4.24"
 
-- 
1.7.3.4




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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-16 19:46 ` [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI nitin.a.kamble
@ 2013-01-18 17:18   ` Saul Wold
  2013-01-18 17:23     ` Kamble, Nitin A
  0 siblings, 1 reply; 9+ messages in thread
From: Saul Wold @ 2013-01-18 17:18 UTC (permalink / raw)
  To: nitin.a.kamble; +Cc: Openembedded-core

On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
> This makes replacing kernel git repository easy.
> For example you can add the following line in your local.conf to use your
> own local kernel repository:
>
> KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-3.4.git/;protocol=file"
>
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> index 70ed967..92129b6 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
>   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
>   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
>
> -SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
> +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-3.4.git;protocol=git"
> +SRC_URI = "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
>

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your 
local.conf file:

> SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file
;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Yes, it might require a little cut paste of the nocheck... part.

Sau!



>   LINUX_VERSION ?= "3.4.24"
>
>



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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-18 17:18   ` Saul Wold
@ 2013-01-18 17:23     ` Kamble, Nitin A
  2013-01-18 17:37       ` Saul Wold
  0 siblings, 1 reply; 9+ messages in thread
From: Kamble, Nitin A @ 2013-01-18 17:23 UTC (permalink / raw)
  To: Saul Wold; +Cc: Openembedded-core@lists.openembedded.org



> -----Original Message-----
> From: Saul Wold [mailto:sgw@linux.intel.com]
> Sent: Friday, January 18, 2013 9:19 AM
> To: Kamble, Nitin A
> Cc: Openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> 
> On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
> > From: Nitin A Kamble <nitin.a.kamble@intel.com>
> >
> > This makes replacing kernel git repository easy.
> > For example you can add the following line in your local.conf to use
> > your own local kernel repository:
> >
> > KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-
> 3.4.git/;protocol=file"
> >
> > Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> > ---
> >   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
> >   1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > index 70ed967..92129b6 100644
> > --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=
> "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> >   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> >   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
> >
> > -SRC_URI = "git://git.yoctoproject.org/linux-yocto-
> 3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma
> chine,meta"
> > +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-
> 3.4.git;protocol=git"
> > +SRC_URI =
> "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${
> KMETA};name=machine,meta"
> >
> 
> Nitin,
> 
> Can't the same be accomplished by setting SRC_URI-yocto-linux in your
> local.conf file:
> 
> > SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file
> ;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
> 
> Yes, it might require a little cut paste of the nocheck... part.
> 
> Sau!
> 


Saul,
   This way same settings can be used for any BSP. And shouldn't we make life of YP developer easy?

Thanks,
Nitin

> 
> 
> >   LINUX_VERSION ?= "3.4.24"
> >
> >



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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-18 17:23     ` Kamble, Nitin A
@ 2013-01-18 17:37       ` Saul Wold
  2013-01-18 17:43         ` Kamble, Nitin A
  0 siblings, 1 reply; 9+ messages in thread
From: Saul Wold @ 2013-01-18 17:37 UTC (permalink / raw)
  To: Kamble, Nitin A; +Cc: Openembedded-core@lists.openembedded.org

On 01/18/2013 09:23 AM, Kamble, Nitin A wrote:
>
>
>> -----Original Message-----
>> From: Saul Wold [mailto:sgw@linux.intel.com]
>> Sent: Friday, January 18, 2013 9:19 AM
>> To: Kamble, Nitin A
>> Cc: Openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
>> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
>>
>> On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
>>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>>>
>>> This makes replacing kernel git repository easy.
>>> For example you can add the following line in your local.conf to use
>>> your own local kernel repository:
>>>
>>> KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-
>> 3.4.git/;protocol=file"
>>>
>>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
>>> ---
>>>    meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
>>>    1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
>>> b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
>>> index 70ed967..92129b6 100644
>>> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
>>> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
>>> @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=
>> "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
>>>    SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
>>>    SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
>>>
>>> -SRC_URI = "git://git.yoctoproject.org/linux-yocto-
>> 3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma
>> chine,meta"
>>> +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-
>> 3.4.git;protocol=git"
>>> +SRC_URI =
>> "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${
>> KMETA};name=machine,meta"
>>>
>>
>> Nitin,
>>
>> Can't the same be accomplished by setting SRC_URI-yocto-linux in your
>> local.conf file:
>>
>>> SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file
>> ;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
>>
>> Yes, it might require a little cut paste of the nocheck... part.
>>
>> Sau!
>>
>
>
> Saul,
>     This way same settings can be used for any BSP. And shouldn't we make life of YP developer easy?
>
This just seems like an extra variable that then needs to be documented 
when the SRC_URI already exists for this purpose.

Sau!

> Thanks,
> Nitin
>
>>
>>
>>>    LINUX_VERSION ?= "3.4.24"
>>>
>>>
>
>



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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-18 17:37       ` Saul Wold
@ 2013-01-18 17:43         ` Kamble, Nitin A
  2013-01-20 13:44           ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Kamble, Nitin A @ 2013-01-18 17:43 UTC (permalink / raw)
  To: Saul Wold; +Cc: Openembedded-core@lists.openembedded.org



> -----Original Message-----
> From: Saul Wold [mailto:sgw@linux.intel.com]
> Sent: Friday, January 18, 2013 9:37 AM
> To: Kamble, Nitin A
> Cc: Openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> 
> On 01/18/2013 09:23 AM, Kamble, Nitin A wrote:
> >
> >
> >> -----Original Message-----
> >> From: Saul Wold [mailto:sgw@linux.intel.com]
> >> Sent: Friday, January 18, 2013 9:19 AM
> >> To: Kamble, Nitin A
> >> Cc: Openembedded-core@lists.openembedded.org
> >> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> >> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> >>
> >> On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
> >>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> >>>
> >>> This makes replacing kernel git repository easy.
> >>> For example you can add the following line in your local.conf to use
> >>> your own local kernel repository:
> >>>
> >>> KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-
> >> 3.4.git/;protocol=file"
> >>>
> >>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> >>> ---
> >>>    meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
> >>>    1 files changed, 2 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> >>> b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> >>> index 70ed967..92129b6 100644
> >>> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> >>> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> >>> @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=
> >> "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> >>>    SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> >>>    SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
> >>>
> >>> -SRC_URI = "git://git.yoctoproject.org/linux-yocto-
> >>
> 3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma
> >> chine,meta"
> >>> +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-
> >> 3.4.git;protocol=git"
> >>> +SRC_URI =
> >>
> "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${
> >> KMETA};name=machine,meta"
> >>>
> >>
> >> Nitin,
> >>
> >> Can't the same be accomplished by setting SRC_URI-yocto-linux in your
> >> local.conf file:
> >>
> >>> SRC_URI_linux-yocto =
> >>> "/home/nitin/linux-yocto-3.4.git/;protocol=file
> >> ;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
> >>
> >> Yes, it might require a little cut paste of the nocheck... part.
> >>
> >> Sau!
> >>
> >
> >
> > Saul,
> >     This way same settings can be used for any BSP. And shouldn't we make
> life of YP developer easy?
> >
> This just seems like an extra variable that then needs to be documented
> when the SRC_URI already exists for this purpose.

And this new variable is going to make kernel developer's life easy to just replace the kernel repository
while keeping all the kernel repo branch names same. 

As a kernel/BSP developer it definitely makes my life easier.

Thanks,
Nitin


> 
> Sau!
> 
> > Thanks,
> > Nitin
> >
> >>
> >>
> >>>    LINUX_VERSION ?= "3.4.24"
> >>>
> >>>
> >
> >



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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-18 17:43         ` Kamble, Nitin A
@ 2013-01-20 13:44           ` Richard Purdie
  2013-01-21  0:25             ` Kamble, Nitin A
  2013-01-21  1:25             ` Bruce Ashfield
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Purdie @ 2013-01-20 13:44 UTC (permalink / raw)
  To: Kamble, Nitin A; +Cc: Openembedded-core@lists.openembedded.org

On Fri, 2013-01-18 at 17:43 +0000, Kamble, Nitin A wrote:
> 
> > -----Original Message-----
> > From: Saul Wold [mailto:sgw@linux.intel.com]
> > Sent: Friday, January 18, 2013 9:37 AM
> > To: Kamble, Nitin A
> > Cc: Openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> > ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> > 
> > On 01/18/2013 09:23 AM, Kamble, Nitin A wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Saul Wold [mailto:sgw@linux.intel.com]
> > >> Sent: Friday, January 18, 2013 9:19 AM
> > >> To: Kamble, Nitin A
> > >> Cc: Openembedded-core@lists.openembedded.org
> > >> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> > >> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> > >>
> > >> On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
> > >>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> > >>>
> > >>> This makes replacing kernel git repository easy.
> > >>> For example you can add the following line in your local.conf to use
> > >>> your own local kernel repository:
> > >>>
> > >>> KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-
> > >> 3.4.git/;protocol=file"
> > >>>
> > >>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> > >>> ---
> > >>>    meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
> > >>>    1 files changed, 2 insertions(+), 1 deletions(-)
> > >>>
> > >>> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > >>> b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > >>> index 70ed967..92129b6 100644
> > >>> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > >>> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > >>> @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=
> > >> "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> > >>>    SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> > >>>    SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
> > >>>
> > >>> -SRC_URI = "git://git.yoctoproject.org/linux-yocto-
> > >>
> > 3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma
> > >> chine,meta"
> > >>> +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-
> > >> 3.4.git;protocol=git"
> > >>> +SRC_URI =
> > >>
> > "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${
> > >> KMETA};name=machine,meta"
> > >>>
> > >>
> > >> Nitin,
> > >>
> > >> Can't the same be accomplished by setting SRC_URI-yocto-linux in your
> > >> local.conf file:
> > >>
> > >>> SRC_URI_linux-yocto =
> > >>> "/home/nitin/linux-yocto-3.4.git/;protocol=file
> > >> ;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
> > >>
> > >> Yes, it might require a little cut paste of the nocheck... part.
> > >>
> > >> Sau!
> > >>
> > >
> > >
> > > Saul,
> > >     This way same settings can be used for any BSP. And shouldn't we make
> > life of YP developer easy?
> > >
> > This just seems like an extra variable that then needs to be documented
> > when the SRC_URI already exists for this purpose.
> 
> And this new variable is going to make kernel developer's life easy to just replace the kernel repository
> while keeping all the kernel repo branch names same. 
> 
> As a kernel/BSP developer it definitely makes my life easier.

I'm not taking things like this which solve a given specialist use case
but would need to result in every recipe changing where someone wanted
to do this. To be blunt, your choice of variable name also sucks.

Embrace the power of the scripting we have, there are much more
interesting ways to solve this problem generically. For example, I wrote
this piece of code in a few minutes (admittedly untested):


urlremapper.bbclass:

python () {
    mod = False
    newsrcuri = []
    srcuri = (d.getVar("SRC_URI", True) or "").split()
    maps = d.getVarFlags("URLREMAP")
    for uri in srcuri:
        for u in maps: 
        if uri.startswith(u):
            uri.replace(u, maps[u])
            mod = True
        newsrcuri.append(uri)
    if mod:
        d.setVar("SRC_URI", " ".join(newsrcuri))
}


URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] = "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"

which should do what you want but in a generic way which doesn't require
us to hack each recipe. You can do it completely locally if you create a
classes directory alongside your conf directory and place the .bbclass
there, then add INHERIT += "urlremapper" in local.conf.

Cheers,

Richard





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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-20 13:44           ` Richard Purdie
@ 2013-01-21  0:25             ` Kamble, Nitin A
  2013-01-21  1:25             ` Bruce Ashfield
  1 sibling, 0 replies; 9+ messages in thread
From: Kamble, Nitin A @ 2013-01-21  0:25 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Openembedded-core@lists.openembedded.org

> Embrace the power of the scripting we have, there are much more
> interesting ways to solve this problem generically. For example, I wrote this
> piece of code in a few minutes (admittedly untested):
> 
> 
> urlremapper.bbclass:
> 
> python () {
>     mod = False
>     newsrcuri = []
>     srcuri = (d.getVar("SRC_URI", True) or "").split()
>     maps = d.getVarFlags("URLREMAP")
>     for uri in srcuri:
>         for u in maps:
>         if uri.startswith(u):
>             uri.replace(u, maps[u])
>             mod = True
>         newsrcuri.append(uri)
>     if mod:
>         d.setVar("SRC_URI", " ".join(newsrcuri)) }
> 
> 
> URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] =
> "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"
> 
> which should do what you want but in a generic way which doesn't require us
> to hack each recipe. You can do it completely locally if you create a classes
> directory alongside your conf directory and place the .bbclass there, then add
> INHERIT += "urlremapper" in local.conf.
> 
> Cheers,
> 
> Richard
> 
Richard,
  I understand your point. And this newer solution should work. If possible I would like to push this class in the oecore layer so that I don't have to maintain it myself. Also can this be done selectively for a BSP by using the bspname override?

Thanks,
Nitin
 

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

* Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
  2013-01-20 13:44           ` Richard Purdie
  2013-01-21  0:25             ` Kamble, Nitin A
@ 2013-01-21  1:25             ` Bruce Ashfield
  1 sibling, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2013-01-21  1:25 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Openembedded-core@lists.openembedded.org

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

On Sun, Jan 20, 2013 at 8:44 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2013-01-18 at 17:43 +0000, Kamble, Nitin A wrote:
> >
> > > -----Original Message-----
> > > From: Saul Wold [mailto:sgw@linux.intel.com]
> > > Sent: Friday, January 18, 2013 9:37 AM
> > > To: Kamble, Nitin A
> > > Cc: Openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> > > ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> > >
> > > On 01/18/2013 09:23 AM, Kamble, Nitin A wrote:
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: Saul Wold [mailto:sgw@linux.intel.com]
> > > >> Sent: Friday, January 18, 2013 9:19 AM
> > > >> To: Kamble, Nitin A
> > > >> Cc: Openembedded-core@lists.openembedded.org
> > > >> Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use
> > > >> ${KSRC_linux_yocto_3_4_repo} based SRC_URI
> > > >>
> > > >> On 01/16/2013 11:46 AM, nitin.a.kamble@intel.com wrote:
> > > >>> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> > > >>>
> > > >>> This makes replacing kernel git repository easy.
> > > >>> For example you can add the following line in your local.conf to
> use
> > > >>> your own local kernel repository:
> > > >>>
> > > >>> KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-
> > > >> 3.4.git/;protocol=file"
> > > >>>
> > > >>> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> > > >>> ---
> > > >>>    meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
> > > >>>    1 files changed, 2 insertions(+), 1 deletions(-)
> > > >>>
> > > >>> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > > >>> b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > > >>> index 70ed967..92129b6 100644
> > > >>> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > > >>> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> > > >>> @@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=
> > > >> "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> > > >>>    SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
> > > >>>    SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
> > > >>>
> > > >>> -SRC_URI = "git://git.yoctoproject.org/linux-yocto-
> > > >>
> > > 3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma
> > > >> chine,meta"
> > > >>> +KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-
> > > >> 3.4.git;protocol=git"
> > > >>> +SRC_URI =
> > > >>
> > > "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${
> > > >> KMETA};name=machine,meta"
> > > >>>
> > > >>
> > > >> Nitin,
> > > >>
> > > >> Can't the same be accomplished by setting SRC_URI-yocto-linux in
> your
> > > >> local.conf file:
> > > >>
> > > >>> SRC_URI_linux-yocto =
> > > >>> "/home/nitin/linux-yocto-3.4.git/;protocol=file
> > > >> ;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
> > > >>
> > > >> Yes, it might require a little cut paste of the nocheck... part.
> > > >>
> > > >> Sau!
> > > >>
> > > >
> > > >
> > > > Saul,
> > > >     This way same settings can be used for any BSP. And shouldn't we
> make
> > > life of YP developer easy?
> > > >
> > > This just seems like an extra variable that then needs to be documented
> > > when the SRC_URI already exists for this purpose.
> >
> > And this new variable is going to make kernel developer's life easy to
> just replace the kernel repository
> > while keeping all the kernel repo branch names same.
> >
> > As a kernel/BSP developer it definitely makes my life easier.
>
> I'm not taking things like this which solve a given specialist use case
> but would need to result in every recipe changing where someone wanted
> to do this. To be blunt, your choice of variable name also sucks.
>
> Embrace the power of the scripting we have, there are much more
> interesting ways to solve this problem generically. For example, I wrote
> this piece of code in a few minutes (admittedly untested):
>
>
Agreed! I'm not even sure how I missed that this was to the *oe-core*
linux-yocto
recipes (Nitin: you need to cc' me, or let me stage and merge changes to
these
recipes as a general rule), but I wouldn't have let this in either.

I admit to having such things in local/hack layers, but they definitely are
not something
I'd ever have wanted to see in main recipes.

Cheers,

Bruce


>
> urlremapper.bbclass:
>
> python () {
>     mod = False
>     newsrcuri = []
>     srcuri = (d.getVar("SRC_URI", True) or "").split()
>     maps = d.getVarFlags("URLREMAP")
>     for uri in srcuri:
>         for u in maps:
>         if uri.startswith(u):
>             uri.replace(u, maps[u])
>             mod = True
>         newsrcuri.append(uri)
>     if mod:
>         d.setVar("SRC_URI", " ".join(newsrcuri))
> }
>
>
> URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] =
> "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"
>
> which should do what you want but in a generic way which doesn't require
> us to hack each recipe. You can do it completely locally if you create a
> classes directory alongside your conf directory and place the .bbclass
> there, then add INHERIT += "urlremapper" in local.conf.
>
> Cheers,
>
> Richard
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

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

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

end of thread, other threads:[~2013-01-21  1:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 19:46 [PATCH 0/1] one commit to make kernel repo change easy nitin.a.kamble
2013-01-16 19:46 ` [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI nitin.a.kamble
2013-01-18 17:18   ` Saul Wold
2013-01-18 17:23     ` Kamble, Nitin A
2013-01-18 17:37       ` Saul Wold
2013-01-18 17:43         ` Kamble, Nitin A
2013-01-20 13:44           ` Richard Purdie
2013-01-21  0:25             ` Kamble, Nitin A
2013-01-21  1:25             ` Bruce Ashfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox