Skip to contentSkip to conversation

bitbake.conf/base.bbclass: Drop PRINC support

PATCH In review Richard Purdie 3 participants 5 messages Nov 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake.conf/base.bbclass: Drop PRINC support

PRINC is no longer needed since we have the PR service instead which people should be using. Drop the PRINC code.

This has been deprecated with a warning for a while so we can remove it now.

meta/classes/base.bbclass +0 -16
index e1b25ff..b2c4f08 100644
@@ -369,22 +369,6 @@ python () {
         else:
             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 %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated.  The PR server should be used to automatically increment the PR.  See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
-        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)
-
     pn = d.getVar('PN', True)
     license = d.getVar('LICENSE', True)
     if license == "INVALID":
meta/conf/bitbake.conf +0 -1
index 2a8a37f..8842d6b 100644
@@ -181,7 +181,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}"
#1 lore raw
Quoted 40 lines · Richard Purdie

PRINC is no longer needed since we have the PR service instead which people should be using. Drop the PRINC code.

This has been deprecated with a warning for a while so we can remove it now.

meta/classes/base.bbclass +0 -16
index e1b25ff..b2c4f08 100644
@@ -369,22 +369,6 @@ python () {
          else:
              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 %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated.  The PR server should be used to automatically increment the PR.  See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
-        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)
-
      pn = d.getVar('PN', True)
      license = d.getVar('LICENSE', True)
      if license == "INVALID":
meta/conf/bitbake.conf +0 -0
index 2a8a37f..8842d6b 100644

meta/conf/bitbake.conf ASSUME_PROVIDED = "\ · line 186

Quoted 7 lines
meta/conf/bitbake.conf +0 -1
@@ -181,7 +181,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}"

Won't this just silently make use of PRINC a no-op? What about the users that had their head in the sand for the last few months but still expect PRINC to have some effect (and maybe don't use PR server)? I would think escalating this to an error would make more sense (and follow other warnings that are now errors).

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#2 lore raw
Quoted 5 lines · Gary Thomas

Won't this just silently make use of PRINC a no-op? What about the users that had their head in the sand for the last few months but still expect PRINC to have some effect (and maybe don't use PR server)? I would think escalating this to an error would make more sense (and follow other warnings that are now errors).

I agree with Gary, move this to ERROR now and drop in 1.9.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 8 lines · Otavio Salvador
Quoted 5 lines · Gary Thomas

Won't this just silently make use of PRINC a no-op? What about the users that had their head in the sand for the last few months but still expect PRINC to have some effect (and maybe don't use PR server)? I would think escalating this to an error would make more sense (and follow other warnings that are now errors).

I agree with Gary, move this to ERROR now and drop in 1.9.

Its been printing warnings since May 2013. I tried to merge this 6 months ago, I was told to wait another release, by you:

http://lists.openembedded.org/pipermail/openembedded-core/2014-March/090169.html

Now I need to keep the patch for another 6 months. This really is taking too long IMO. I may well get bored and just drop the patch (and forget any other ideas about trying to cleanup things).

Cheers,

Richard

#4 lore raw
Quoted 10 lines · Richard Purdie
Quoted 8 lines · Otavio Salvador
Quoted 5 lines · Gary Thomas

Won't this just silently make use of PRINC a no-op? What about the users that had their head in the sand for the last few months but still expect PRINC to have some effect (and maybe don't use PR server)? I would think escalating this to an error would make more sense (and follow other warnings that are now errors).

I agree with Gary, move this to ERROR now and drop in 1.9.

Quoted 8 lines

Its been printing warnings since May 2013. I tried to merge this 6 months ago, I was told to wait another release, by you:

http://lists.openembedded.org/pipermail/openembedded-core/2014-March/090169.html

Now I need to keep the patch for another 6 months. This really is taking too long IMO. I may well get bored and just drop the patch (and forget any other ideas about trying to cleanup things).

I understand your frustration but I think we ought to be conservative here. People tend to have old layers around and we risk to those never get PRINC removed if we don't 'explicit' the error for those users.

I think we ought ERROR now and remove it in 1.9.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750