public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Constantin Musca <constantinx.musca@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] migrate_localcount.bbclass: use PRAUTOINX instead of PN & PV
Date: Mon, 28 Jan 2013 11:01:20 +0200	[thread overview]
Message-ID: <1359363680-4588-1-git-send-email-constantinx.musca@intel.com> (raw)

- we need to use PRAUTOINX (it covers all cases)
- it addresses bumped PE issues

[YOCTO #3071]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
 meta/classes/migrate_localcount.bbclass | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/classes/migrate_localcount.bbclass b/meta/classes/migrate_localcount.bbclass
index 59f14e8..3916ad4 100644
--- a/meta/classes/migrate_localcount.bbclass
+++ b/meta/classes/migrate_localcount.bbclass
@@ -18,14 +18,13 @@ python migrate_localcount_handler () {
         if not revs or not counts:
             return
 
-        srcrev = bb.fetch2.get_srcrev(e.data)
-        bpv = pv[:pv.find(srcrev)]
-
         if len(revs) != len(counts):
             bb.warn("The number of revs and localcounts don't match in %s" % pn)
             return
 
-        version = 'AUTOINC-%s-%s' % (pn, bpv)
+        version = e.data.getVar('PRAUTOINX', True)
+        srcrev = bb.fetch2.get_srcrev(e.data)
+        base_ver = 'AUTOINC-%s' % version[:version.find(srcrev)]
         pkgarch = e.data.getVar('PACKAGE_ARCH', True)
         value = max(int(count) for count in counts)
 
@@ -40,7 +39,7 @@ python migrate_localcount_handler () {
         flock = bb.utils.lockfile("%s.lock" % df)
         with open(df, 'a') as fd:
             fd.write('PRAUTO$%s$%s$%s = "%s"\n' %
-                    (version, pkgarch, srcrev, str(value)))
+                    (base_ver, pkgarch, srcrev, str(value)))
         bb.utils.unlockfile(flock)
 }
 
-- 
1.7.11.7




             reply	other threads:[~2013-01-28  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28  9:01 Constantin Musca [this message]
2013-01-28 12:56 ` [PATCH] migrate_localcount.bbclass: use PRAUTOINX instead of PN & PV Martin Jansa
2013-01-28 14:35   ` Martin Jansa
2013-01-28 15:03     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359363680-4588-1-git-send-email-constantinx.musca@intel.com \
    --to=constantinx.musca@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox