summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/distro_check.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/lib/oe/distro_check.py
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-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/lib/oe/distro_check.py')
-rw-r--r--meta/lib/oe/distro_check.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index c666ddc257..f54f4bb67d 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -224,37 +224,37 @@ def compare_in_distro_packages_list(distro_check_dir, d):
224 localdata = bb.data.createCopy(d) 224 localdata = bb.data.createCopy(d)
225 pkglst_dir = os.path.join(distro_check_dir, "package_lists") 225 pkglst_dir = os.path.join(distro_check_dir, "package_lists")
226 matching_distros = [] 226 matching_distros = []
227 pn = recipe_name = d.getVar('PN', True) 227 pn = recipe_name = d.getVar('PN')
228 bb.note("Checking: %s" % pn) 228 bb.note("Checking: %s" % pn)
229 229
230 if pn.find("-native") != -1: 230 if pn.find("-native") != -1:
231 pnstripped = pn.split("-native") 231 pnstripped = pn.split("-native")
232 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True)) 232 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
233 bb.data.update_data(localdata) 233 bb.data.update_data(localdata)
234 recipe_name = pnstripped[0] 234 recipe_name = pnstripped[0]
235 235
236 if pn.startswith("nativesdk-"): 236 if pn.startswith("nativesdk-"):
237 pnstripped = pn.split("nativesdk-") 237 pnstripped = pn.split("nativesdk-")
238 localdata.setVar('OVERRIDES', "pn-" + pnstripped[1] + ":" + d.getVar('OVERRIDES', True)) 238 localdata.setVar('OVERRIDES', "pn-" + pnstripped[1] + ":" + d.getVar('OVERRIDES'))
239 bb.data.update_data(localdata) 239 bb.data.update_data(localdata)
240 recipe_name = pnstripped[1] 240 recipe_name = pnstripped[1]
241 241
242 if pn.find("-cross") != -1: 242 if pn.find("-cross") != -1:
243 pnstripped = pn.split("-cross") 243 pnstripped = pn.split("-cross")
244 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True)) 244 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
245 bb.data.update_data(localdata) 245 bb.data.update_data(localdata)
246 recipe_name = pnstripped[0] 246 recipe_name = pnstripped[0]
247 247
248 if pn.find("-initial") != -1: 248 if pn.find("-initial") != -1:
249 pnstripped = pn.split("-initial") 249 pnstripped = pn.split("-initial")
250 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True)) 250 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
251 bb.data.update_data(localdata) 251 bb.data.update_data(localdata)
252 recipe_name = pnstripped[0] 252 recipe_name = pnstripped[0]
253 253
254 bb.note("Recipe: %s" % recipe_name) 254 bb.note("Recipe: %s" % recipe_name)
255 255
256 distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) 256 distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'})
257 tmp = localdata.getVar('DISTRO_PN_ALIAS', True) or "" 257 tmp = localdata.getVar('DISTRO_PN_ALIAS') or ""
258 for str in tmp.split(): 258 for str in tmp.split():
259 if str and str.find("=") == -1 and distro_exceptions[str]: 259 if str and str.find("=") == -1 and distro_exceptions[str]:
260 matching_distros.append(str) 260 matching_distros.append(str)
@@ -286,10 +286,10 @@ def compare_in_distro_packages_list(distro_check_dir, d):
286 return matching_distros 286 return matching_distros
287 287
288def create_log_file(d, logname): 288def create_log_file(d, logname):
289 logpath = d.getVar('LOG_DIR', True) 289 logpath = d.getVar('LOG_DIR')
290 bb.utils.mkdirhier(logpath) 290 bb.utils.mkdirhier(logpath)
291 logfn, logsuffix = os.path.splitext(logname) 291 logfn, logsuffix = os.path.splitext(logname)
292 logfile = os.path.join(logpath, "%s.%s%s" % (logfn, d.getVar('DATETIME', True), logsuffix)) 292 logfile = os.path.join(logpath, "%s.%s%s" % (logfn, d.getVar('DATETIME'), logsuffix))
293 if not os.path.exists(logfile): 293 if not os.path.exists(logfile):
294 slogfile = os.path.join(logpath, logname) 294 slogfile = os.path.join(logpath, logname)
295 if os.path.exists(slogfile): 295 if os.path.exists(slogfile):
@@ -301,8 +301,8 @@ def create_log_file(d, logname):
301 301
302 302
303def save_distro_check_result(result, datetime, result_file, d): 303def save_distro_check_result(result, datetime, result_file, d):
304 pn = d.getVar('PN', True) 304 pn = d.getVar('PN')
305 logdir = d.getVar('LOG_DIR', True) 305 logdir = d.getVar('LOG_DIR')
306 if not logdir: 306 if not logdir:
307 bb.error("LOG_DIR variable is not defined, can't write the distro_check results") 307 bb.error("LOG_DIR variable is not defined, can't write the distro_check results")
308 return 308 return