[oe] [oe-commits] Mark Hatle : base.bbclass: Deprecate the PRINC logic

Martin Jansa martin.jansa at gmail.com
Tue May 28 13:46:06 UTC 2013


On Tue, May 28, 2013 at 01:28:41PM +0000, git at git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master-next
> Commit: e1cf564ebc8e7b4fa626a645356f6a4d7f5ba064
> URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e1cf564ebc8e7b4fa626a645356f6a4d7f5ba064
> 
> Author: Mark Hatle <mark.hatle at windriver.com>
> Date:   Tue May 21 13:29:03 2013 -0500
> 
> base.bbclass: Deprecate the PRINC logic
> 
> The PRINC logic is now deprecated, the PR server should be used to handle
> the automatic incrementing of the PR (package release) field.  The default
> setting of '0' has been removed, and a warning message has been added.

How are people supposed to remove existing PRINC without causing version
going backwards?

Do I have to choose between seeing 100 warnings about deprecated PRINC
or 100 ERRORs from buildhistory about versions going backwards?

> Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> 
> ---
> 
>  meta/classes/base.bbclass |    4 ++++
>  meta/conf/bitbake.conf    |    1 -
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index b1642a2..29084a2 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -465,8 +465,12 @@ python () {
>              appendVar('EXTRA_OECONF', extraconf)
>  
>      # If PRINC is set, try and increase the PR value by the amount specified
> +    # The PR server is now the preferred way to handle PR changes based on
> +    # the checksum of the recipe (including bbappend).  The PRINC is now
> +    # obsolete.  Return a warning to the user.
>      princ = d.getVar('PRINC', True)
>      if princ and princ != "0":
> +        bb.warn("Use of PRINC is deprecated.  The PR server should be used to automatically increment the PR.  See: https://wiki.yoctoproject.org/wiki/PR_Service"
>          pr = d.getVar('PR', True)
>          pr_prefix = re.search("\D+",pr)
>          prval = re.search("\d+",pr)
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 174236d..115832c 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -186,7 +186,6 @@ ASSUME_PROVIDED = "\
>  PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}"
>  PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}"
>  PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}"
> -PRINC ?= "0"
>  PF = "${PN}-${EXTENDPE}${PV}-${PR}"
>  EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}"
>  P = "${PN}-${PV}"
> 
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20130528/0a10b35c/attachment-0002.sig>


More information about the Openembedded-devel mailing list