Lines Matching refs:lines
19 lines = f.readlines()
20 return lines
22 def sanity_conf_find_line(pattern, lines):
25 for index, line in enumerate(lines)
28 def sanity_conf_update(fn, lines, version_var_name, new_version):
29 index, line = sanity_conf_find_line(r"^%s" % version_var_name, lines)
30 lines[index] = '%s = "%d"\n' % (version_var_name, new_version)
32 f.write(''.join(lines))
102 lines = []
108 lines = sanity_conf_read(bblayers_fn)
112 index, bbpath_line = sanity_conf_find_line('BBPATH', lines)
117 lines[index] = (bbpath_line[:start + 1] +
121 lines[index] = (bbpath_line[:start + 1] +
126 index, bbfiles_line = sanity_conf_find_line('BBFILES', lines)
128 lines.insert(index, 'BBPATH = "' + topdir_var + '"\n')
133 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
140 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
155 index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
157 lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
163 index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines)
165 lines[index] = 'POKY_BBLAYERS_CONF_VERSION = "1"\n'
169 f.write(''.join(lines))
173 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
567 lines = f.readlines()
568 for l in reversed(lines):