diff options
-rw-r--r-- | meta/classes/migrate_localcount.bbclass | 9 |
1 files changed, 4 insertions, 5 deletions
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 () { | |||
18 | if not revs or not counts: | 18 | if not revs or not counts: |
19 | return | 19 | return |
20 | 20 | ||
21 | srcrev = bb.fetch2.get_srcrev(e.data) | ||
22 | bpv = pv[:pv.find(srcrev)] | ||
23 | |||
24 | if len(revs) != len(counts): | 21 | if len(revs) != len(counts): |
25 | bb.warn("The number of revs and localcounts don't match in %s" % pn) | 22 | bb.warn("The number of revs and localcounts don't match in %s" % pn) |
26 | return | 23 | return |
27 | 24 | ||
28 | version = 'AUTOINC-%s-%s' % (pn, bpv) | 25 | version = e.data.getVar('PRAUTOINX', True) |
26 | srcrev = bb.fetch2.get_srcrev(e.data) | ||
27 | base_ver = 'AUTOINC-%s' % version[:version.find(srcrev)] | ||
29 | pkgarch = e.data.getVar('PACKAGE_ARCH', True) | 28 | pkgarch = e.data.getVar('PACKAGE_ARCH', True) |
30 | value = max(int(count) for count in counts) | 29 | value = max(int(count) for count in counts) |
31 | 30 | ||
@@ -40,7 +39,7 @@ python migrate_localcount_handler () { | |||
40 | flock = bb.utils.lockfile("%s.lock" % df) | 39 | flock = bb.utils.lockfile("%s.lock" % df) |
41 | with open(df, 'a') as fd: | 40 | with open(df, 'a') as fd: |
42 | fd.write('PRAUTO$%s$%s$%s = "%s"\n' % | 41 | fd.write('PRAUTO$%s$%s$%s = "%s"\n' % |
43 | (version, pkgarch, srcrev, str(value))) | 42 | (base_ver, pkgarch, srcrev, str(value))) |
44 | bb.utils.unlockfile(flock) | 43 | bb.utils.unlockfile(flock) |
45 | } | 44 | } |
46 | 45 | ||