summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 13:55:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:06:51 +0100
commit3512f797f92f0d51bf3af83bf5126466e2e0cc15 (patch)
tree420619abcbed7fa4596a3190468dfaf32b934f0b /meta
parentcaa8b29c770a78e1d0a70cbe46696856d5ef7ec8 (diff)
downloadpoky-3512f797f92f0d51bf3af83bf5126466e2e0cc15.tar.gz
classes/lib: Update to use print as a function call
In python 3 print is a function call. In some cases bb.note is a more appropriate call to make. (From OE-Core rev: 754874e68d1037c76fc4cc7d35d3fa12946d00f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass6
-rw-r--r--meta/classes/sstate.bbclass6
-rw-r--r--meta/lib/oe/path.py2
3 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 601ef1fb70..17420a8767 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -367,7 +367,9 @@ def check_sanity(sanity_data):
367 try: 367 try:
368 from distutils.version import LooseVersion 368 from distutils.version import LooseVersion
369 except ImportError: 369 except ImportError:
370 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 370 def LooseVersion(v):
371 print("WARNING: sanity.bbclass can't compare versions without python-distutils")
372 return 1
371 import commands 373 import commands
372 374
373 # Check the bitbake version meets minimum requirements 375 # Check the bitbake version meets minimum requirements
@@ -375,7 +377,7 @@ def check_sanity(sanity_data):
375 if not minversion: 377 if not minversion:
376 # Hack: BB_MIN_VERSION hasn't been parsed yet so return 378 # Hack: BB_MIN_VERSION hasn't been parsed yet so return
377 # and wait for the next call 379 # and wait for the next call
378 print "Foo %s" % minversion 380 print("Foo %s" % minversion)
379 return 381 return
380 382
381 if 0 == os.getuid(): 383 if 0 == os.getuid():
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 77ec402704..9a76a6b3cc 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -261,7 +261,7 @@ def sstate_installpkg(ss, d):
261 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed 261 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
262 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd) 262 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
263 263
264 print "Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd) 264 bb.note("Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd))
265 subprocess.call(sstate_hardcode_cmd, shell=True) 265 subprocess.call(sstate_hardcode_cmd, shell=True)
266 266
267 # Need to remove this or we'd copy it into the target directory and may 267 # Need to remove this or we'd copy it into the target directory and may
@@ -408,14 +408,14 @@ def sstate_hardcode_path(d):
408 # This has the side effect of making sure the vfs cache is hot 408 # This has the side effect of making sure the vfs cache is hot
409 sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd) 409 sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
410 410
411 print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd) 411 bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
412 subprocess.call(sstate_hardcode_cmd, shell=True) 412 subprocess.call(sstate_hardcode_cmd, shell=True)
413 413
414 # If the fixmefn is empty, remove it.. 414 # If the fixmefn is empty, remove it..
415 if os.stat(fixmefn).st_size == 0: 415 if os.stat(fixmefn).st_size == 0:
416 os.remove(fixmefn) 416 os.remove(fixmefn)
417 else: 417 else:
418 print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd) 418 bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
419 subprocess.call(sstate_filelist_relative_cmd, shell=True) 419 subprocess.call(sstate_filelist_relative_cmd, shell=True)
420 420
421def sstate_package(ss, d): 421def sstate_package(ss, d):
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index d8eb80225f..da044ba8c8 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -55,7 +55,7 @@ def make_relative_symlink(path):
55 depth += 1 55 depth += 1
56 56
57 if not ancestor: 57 if not ancestor:
58 print "make_relative_symlink() Error: unable to find the common ancestor of %s and its target" % path 58 print("make_relative_symlink() Error: unable to find the common ancestor of %s and its target" % path)
59 return 59 return
60 60
61 base = link.partition(ancestor)[2].strip('/') 61 base = link.partition(ancestor)[2].strip('/')