On Tue, Sep 04, 2012 at 09:18:43PM -0700, Saul Wold wrote:
> On 09/04/2012 02:00 PM, Martin Jansa wrote:
> > On Tue, Sep 04, 2012 at 01:57:19PM -0700, Saul Wold wrote:
> >> Signed-off-by: Saul Wold <s...@linux.intel.com>
> >> ---
> >>   .../recipes-kernel/linux/linux-yocto_3.0.bbappend  |    2 ++
> >>   .../recipes-kernel/linux/linux-yocto_3.2.bbappend  |    6 ++++++
> >>   .../recipes-kernel/linux/linux-yocto_3.4.bbappend  |    6 ++++++
> >>   3 files changed, 14 insertions(+), 0 deletions(-)
> >>   create mode 100644 meta-tlk/recipes-kernel/linux/linux-yocto_3.2.bbappend
> >>   create mode 100644 meta-tlk/recipes-kernel/linux/linux-yocto_3.4.bbappend
> >>
> >> diff --git a/meta-tlk/recipes-kernel/linux/linux-yocto_3.0.bbappend 
> >> b/meta-tlk/recipes-kernel/linux/linux-yocto_3.0.bbappend
> >> index 58a6541..138cc21 100644
> >> --- a/meta-tlk/recipes-kernel/linux/linux-yocto_3.0.bbappend
> >> +++ b/meta-tlk/recipes-kernel/linux/linux-yocto_3.0.bbappend
> >> @@ -2,3 +2,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >>
> >>   # enable the time limited kernel configuration options
> >>   SRC_URI += "file://time-limited-kernel.cfg"
> >> +
> >> +PR .= ".1"
> >
> > why not
> > PRINC := "${@int(PRINC) + 1}"
> > ?
> 
> I understood that the .1 adds more finer granularity instead of 
> incrementing the base PR itself.  You end up with a potential r1.2.1 
> which is still legal.

Yes but also makes order of .bbappends applied even more important.

In case one layer has
PR .= ".2"

and other
PR .= ".1"

Then it will provide r1.2.1 or r1.1.2 depending on order of bbappends
applied. Hopefully you want change order of layers to break every
upgrade path, but why not use PRINC which does not suffer from this?
 
> What happens with a r1.2 and the above @int(PRINC) + 1?

I guess it will produce r2.2

    princ = d.getVar('PRINC', True)
    if princ and princ != "0":
        pr = d.getVar('PR', True)
        pr_prefix = re.search("\D+",pr)
        prval = re.search("\d+",pr)
        if pr_prefix is None or prval is None:
            bb.error("Unable to analyse format of PR variable: %s" % pr)
        nval = int(prval.group(0)) + int(princ)
        pr = pr_prefix.group(0) + str(nval) + pr[prval.end():]
        d.setVar('PR', pr)

Cheers,

> 
> I would need to test it, done for the day right now.
> 
> 
> Sau!
> 
> >> diff --git a/meta-tlk/recipes-kernel/linux/linux-yocto_3.2.bbappend 
> >> b/meta-tlk/recipes-kernel/linux/linux-yocto_3.2.bbappend
> >> new file mode 100644
> >> index 0000000..138cc21
> >> --- /dev/null
> >> +++ b/meta-tlk/recipes-kernel/linux/linux-yocto_3.2.bbappend
> >> @@ -0,0 +1,6 @@
> >> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >> +
> >> +# enable the time limited kernel configuration options
> >> +SRC_URI += "file://time-limited-kernel.cfg"
> >> +
> >> +PR .= ".1"
> >> diff --git a/meta-tlk/recipes-kernel/linux/linux-yocto_3.4.bbappend 
> >> b/meta-tlk/recipes-kernel/linux/linux-yocto_3.4.bbappend
> >> new file mode 100644
> >> index 0000000..138cc21
> >> --- /dev/null
> >> +++ b/meta-tlk/recipes-kernel/linux/linux-yocto_3.4.bbappend
> >> @@ -0,0 +1,6 @@
> >> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >> +
> >> +# enable the time limited kernel configuration options
> >> +SRC_URI += "file://time-limited-kernel.cfg"
> >> +
> >> +PR .= ".1"
> >> --
> >> 1.7.7.6
> >>
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
> >

-- 
Martin 'JaMa' Jansa     jabber: martin.ja...@gmail.com

Attachment: signature.asc
Description: Digital signature

_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to