From ec81b985bb29a8562366f5343171e68a1f9cc4e9 Mon Sep 17 00:00:00 2001 From: Constantin Musca Date: Mon, 28 Jan 2013 11:01:20 +0200 Subject: migrate_localcount.bbclass: use PRAUTOINX instead of PN & PV - we need to use PRAUTOINX (it covers all cases) - it addresses bumped PE issues [YOCTO #3071] Signed-off-by: Constantin Musca Signed-off-by: Richard Purdie --- meta/classes/migrate_localcount.bbclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'meta/classes/migrate_localcount.bbclass') diff --git a/meta/classes/migrate_localcount.bbclass b/meta/classes/migrate_localcount.bbclass index 59f14e8a34..3916ad4461 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) } -- cgit 1.2.3-korg