diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/migrate_localcount.bbclass | |
parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
download | poky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/migrate_localcount.bbclass')
-rw-r--r-- | meta/classes/migrate_localcount.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/migrate_localcount.bbclass b/meta/classes/migrate_localcount.bbclass index aa0df8bb76..810a541316 100644 --- a/meta/classes/migrate_localcount.bbclass +++ b/meta/classes/migrate_localcount.bbclass | |||
@@ -6,12 +6,12 @@ python migrate_localcount_handler () { | |||
6 | if not e.data: | 6 | if not e.data: |
7 | return | 7 | return |
8 | 8 | ||
9 | pv = e.data.getVar('PV', True) | 9 | pv = e.data.getVar('PV') |
10 | if not 'AUTOINC' in pv: | 10 | if not 'AUTOINC' in pv: |
11 | return | 11 | return |
12 | 12 | ||
13 | localcounts = bb.persist_data.persist('BB_URI_LOCALCOUNT', e.data) | 13 | localcounts = bb.persist_data.persist('BB_URI_LOCALCOUNT', e.data) |
14 | pn = e.data.getVar('PN', True) | 14 | pn = e.data.getVar('PN') |
15 | revs = localcounts.get_by_pattern('%%-%s_rev' % pn) | 15 | revs = localcounts.get_by_pattern('%%-%s_rev' % pn) |
16 | counts = localcounts.get_by_pattern('%%-%s_count' % pn) | 16 | counts = localcounts.get_by_pattern('%%-%s_count' % pn) |
17 | if not revs or not counts: | 17 | if not revs or not counts: |
@@ -21,10 +21,10 @@ python migrate_localcount_handler () { | |||
21 | bb.warn("The number of revs and localcounts don't match in %s" % pn) | 21 | bb.warn("The number of revs and localcounts don't match in %s" % pn) |
22 | return | 22 | return |
23 | 23 | ||
24 | version = e.data.getVar('PRAUTOINX', True) | 24 | version = e.data.getVar('PRAUTOINX') |
25 | srcrev = bb.fetch2.get_srcrev(e.data) | 25 | srcrev = bb.fetch2.get_srcrev(e.data) |
26 | base_ver = 'AUTOINC-%s' % version[:version.find(srcrev)] | 26 | base_ver = 'AUTOINC-%s' % version[:version.find(srcrev)] |
27 | pkgarch = e.data.getVar('PACKAGE_ARCH', True) | 27 | pkgarch = e.data.getVar('PACKAGE_ARCH') |
28 | value = max(int(count) for count in counts) | 28 | value = max(int(count) for count in counts) |
29 | 29 | ||
30 | if len(revs) == 1: | 30 | if len(revs) == 1: |
@@ -33,8 +33,8 @@ python migrate_localcount_handler () { | |||
33 | else: | 33 | else: |
34 | value += 1 | 34 | value += 1 |
35 | 35 | ||
36 | bb.utils.mkdirhier(e.data.getVar('PRSERV_DUMPDIR', True)) | 36 | bb.utils.mkdirhier(e.data.getVar('PRSERV_DUMPDIR')) |
37 | df = e.data.getVar('LOCALCOUNT_DUMPFILE', True) | 37 | df = e.data.getVar('LOCALCOUNT_DUMPFILE') |
38 | flock = bb.utils.lockfile("%s.lock" % df) | 38 | flock = bb.utils.lockfile("%s.lock" % df) |
39 | with open(df, 'a') as fd: | 39 | with open(df, 'a') as fd: |
40 | fd.write('PRAUTO$%s$%s$%s = "%s"\n' % | 40 | fd.write('PRAUTO$%s$%s$%s = "%s"\n' % |