summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 14:01:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 10:34:30 +0100
commit654eadfa30624c62018665da618287b6cb5c7e3c (patch)
treeddca0b2edbf92abfd7e7f6e9cd9c3499d704ea45
parent5052bf92e40d8e0764a11e897f06d3d9c7c065e9 (diff)
downloadpoky-654eadfa30624c62018665da618287b6cb5c7e3c.tar.gz
bitbake: bitbake: Update logger.warn() -> logger.warning()
python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-layers6
-rwxr-xr-xbitbake/bin/bitbake-worker2
-rw-r--r--bitbake/lib/bb/__init__.py4
-rw-r--r--bitbake/lib/bb/build.py2
-rw-r--r--bitbake/lib/bb/data.py2
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py36
-rw-r--r--bitbake/lib/bb/fetch2/npm.py4
-rw-r--r--bitbake/lib/bb/monitordisk.py4
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py4
-rw-r--r--bitbake/lib/bb/runqueue.py4
-rw-r--r--bitbake/lib/bb/siggen.py2
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py20
-rw-r--r--bitbake/lib/bb/ui/knotty.py8
-rw-r--r--bitbake/lib/bb/ui/toasterui.py6
-rw-r--r--bitbake/lib/bb/utils.py10
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py2
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py6
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py10
-rw-r--r--bitbake/lib/toaster/contrib/tts/shellutils.py2
-rw-r--r--bitbake/lib/toaster/contrib/tts/urlcheck.py4
-rw-r--r--bitbake/lib/toaster/toastermain/urls.py2
21 files changed, 70 insertions, 70 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index d47a6690e6..8b17eb0696 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -654,7 +654,7 @@ build results (as the layer priority order has effectively changed).
654 logger.plain(' Skipping layer config file %s' % f1full ) 654 logger.plain(' Skipping layer config file %s' % f1full )
655 continue 655 continue
656 else: 656 else:
657 logger.warn('Overwriting file %s', fdest) 657 logger.warning('Overwriting file %s', fdest)
658 bb.utils.copyfile(f1full, fdest) 658 bb.utils.copyfile(f1full, fdest)
659 if ext == '.bb': 659 if ext == '.bb':
660 for append in self.bbhandler.cooker.collection.get_file_appends(f1full): 660 for append in self.bbhandler.cooker.collection.get_file_appends(f1full):
@@ -790,8 +790,8 @@ Lists recipes with the bbappends that apply to them as subitems.
790 790
791 if best_filename: 791 if best_filename:
792 if best_filename in missing: 792 if best_filename in missing:
793 logger.warn('%s: missing append for preferred version', 793 logger.warning('%s: missing append for preferred version',
794 best_filename) 794 best_filename)
795 return True 795 return True
796 else: 796 else:
797 return False 797 return False
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 767a1c0336..a4e8914eec 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -364,7 +364,7 @@ class BitbakeWorker(object):
364 def handle_ping(self, _): 364 def handle_ping(self, _):
365 workerlog_write("Handling ping\n") 365 workerlog_write("Handling ping\n")
366 366
367 logger.warn("Pong from bitbake-worker!") 367 logger.warning("Pong from bitbake-worker!")
368 368
369 def handle_quit(self, data): 369 def handle_quit(self, data):
370 workerlog_write("Handling quit\n") 370 workerlog_write("Handling quit\n")
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index 6c5e5ceaaa..4ae6b8a5f5 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -85,7 +85,7 @@ def plain(*args):
85 85
86def debug(lvl, *args): 86def debug(lvl, *args):
87 if isinstance(lvl, basestring): 87 if isinstance(lvl, basestring):
88 mainlogger.warn("Passed invalid debug level '%s' to bb.debug", lvl) 88 mainlogger.warning("Passed invalid debug level '%s' to bb.debug", lvl)
89 args = (lvl,) + args 89 args = (lvl,) + args
90 lvl = 1 90 lvl = 1
91 mainlogger.debug(lvl, ''.join(args)) 91 mainlogger.debug(lvl, ''.join(args))
@@ -94,7 +94,7 @@ def note(*args):
94 mainlogger.info(''.join(args)) 94 mainlogger.info(''.join(args))
95 95
96def warn(*args): 96def warn(*args):
97 mainlogger.warn(''.join(args)) 97 mainlogger.warning(''.join(args))
98 98
99def error(*args, **kwargs): 99def error(*args, **kwargs):
100 mainlogger.error(''.join(args), extra=kwargs) 100 mainlogger.error(''.join(args), extra=kwargs)
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index a5b99edb7b..9854553038 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -172,7 +172,7 @@ def exec_func(func, d, dirs = None, pythonexception=False):
172 body = d.getVar(func, False) 172 body = d.getVar(func, False)
173 if not body: 173 if not body:
174 if body is None: 174 if body is None:
175 logger.warn("Function %s doesn't exist", func) 175 logger.warning("Function %s doesn't exist", func)
176 return 176 return
177 177
178 flags = d.getVarFlags(func) 178 flags = d.getVarFlags(func)
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index b5dcdbd8f8..e9ce0ad4d0 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -364,7 +364,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
364 if varflags.get("python"): 364 if varflags.get("python"):
365 parser = bb.codeparser.PythonParser(key, logger) 365 parser = bb.codeparser.PythonParser(key, logger)
366 if value and "\t" in value: 366 if value and "\t" in value:
367 logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) 367 logger.warning("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True)))
368 parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno")) 368 parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno"))
369 deps = deps | parser.references 369 deps = deps | parser.references
370 deps = deps | (keys & parser.execs) 370 deps = deps | (keys & parser.execs)
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 6ef0c6fe7a..600e2161fe 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -586,12 +586,12 @@ def verify_checksum(ud, d, precomputed={}):
586 raise NoChecksumError('Missing SRC_URI checksum', ud.url) 586 raise NoChecksumError('Missing SRC_URI checksum', ud.url)
587 587
588 # Log missing sums so user can more easily add them 588 # Log missing sums so user can more easily add them
589 logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n' 589 logger.warning('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
590 'SRC_URI[%s] = "%s"', 590 'SRC_URI[%s] = "%s"',
591 ud.localpath, ud.md5_name, md5data) 591 ud.localpath, ud.md5_name, md5data)
592 logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n' 592 logger.warning('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
593 'SRC_URI[%s] = "%s"', 593 'SRC_URI[%s] = "%s"',
594 ud.localpath, ud.sha256_name, sha256data) 594 ud.localpath, ud.sha256_name, sha256data)
595 595
596 # We want to alert the user if a checksum is defined in the recipe but 596 # We want to alert the user if a checksum is defined in the recipe but
597 # it does not match. 597 # it does not match.
@@ -659,9 +659,9 @@ def verify_donestamp(ud, d, origud=None):
659 # files to those containing the checksums. 659 # files to those containing the checksums.
660 if not isinstance(e, EOFError): 660 if not isinstance(e, EOFError):
661 # Ignore errors, they aren't fatal 661 # Ignore errors, they aren't fatal
662 logger.warn("Couldn't load checksums from donestamp %s: %s " 662 logger.warning("Couldn't load checksums from donestamp %s: %s "
663 "(msg: %s)" % (ud.donestamp, type(e).__name__, 663 "(msg: %s)" % (ud.donestamp, type(e).__name__,
664 str(e))) 664 str(e)))
665 665
666 try: 666 try:
667 checksums = verify_checksum(ud, d, precomputed_checksums) 667 checksums = verify_checksum(ud, d, precomputed_checksums)
@@ -675,8 +675,8 @@ def verify_donestamp(ud, d, origud=None):
675 except ChecksumError as e: 675 except ChecksumError as e:
676 # Checksums failed to verify, trigger re-download and remove the 676 # Checksums failed to verify, trigger re-download and remove the
677 # incorrect stamp file. 677 # incorrect stamp file.
678 logger.warn("Checksum mismatch for local file %s\n" 678 logger.warning("Checksum mismatch for local file %s\n"
679 "Cleaning and trying again." % ud.localpath) 679 "Cleaning and trying again." % ud.localpath)
680 if os.path.exists(ud.localpath): 680 if os.path.exists(ud.localpath):
681 rename_bad_checksum(ud, e.checksum) 681 rename_bad_checksum(ud, e.checksum)
682 bb.utils.remove(ud.donestamp) 682 bb.utils.remove(ud.donestamp)
@@ -708,8 +708,8 @@ def update_stamp(ud, d):
708 except ChecksumError as e: 708 except ChecksumError as e:
709 # Checksums failed to verify, trigger re-download and remove the 709 # Checksums failed to verify, trigger re-download and remove the
710 # incorrect stamp file. 710 # incorrect stamp file.
711 logger.warn("Checksum mismatch for local file %s\n" 711 logger.warning("Checksum mismatch for local file %s\n"
712 "Cleaning and trying again." % ud.localpath) 712 "Cleaning and trying again." % ud.localpath)
713 if os.path.exists(ud.localpath): 713 if os.path.exists(ud.localpath):
714 rename_bad_checksum(ud, e.checksum) 714 rename_bad_checksum(ud, e.checksum)
715 bb.utils.remove(ud.donestamp) 715 bb.utils.remove(ud.donestamp)
@@ -984,8 +984,8 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
984 984
985 except bb.fetch2.BBFetchException as e: 985 except bb.fetch2.BBFetchException as e:
986 if isinstance(e, ChecksumError): 986 if isinstance(e, ChecksumError):
987 logger.warn("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (ud.url, origud.url)) 987 logger.warning("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (ud.url, origud.url))
988 logger.warn(str(e)) 988 logger.warning(str(e))
989 if os.path.exists(ud.localpath): 989 if os.path.exists(ud.localpath):
990 rename_bad_checksum(ud, e.checksum) 990 rename_bad_checksum(ud, e.checksum)
991 elif isinstance(e, NoChecksumError): 991 elif isinstance(e, NoChecksumError):
@@ -1200,7 +1200,7 @@ class FetchData(object):
1200 raise NonLocalMethod() 1200 raise NonLocalMethod()
1201 1201
1202 if self.parm.get("proto", None) and "protocol" not in self.parm: 1202 if self.parm.get("proto", None) and "protocol" not in self.parm:
1203 logger.warn('Consider updating %s recipe to use "protocol" not "proto" in SRC_URI.', d.getVar('PN', True)) 1203 logger.warning('Consider updating %s recipe to use "protocol" not "proto" in SRC_URI.', d.getVar('PN', True))
1204 self.parm["protocol"] = self.parm.get("proto", None) 1204 self.parm["protocol"] = self.parm.get("proto", None)
1205 1205
1206 if hasattr(self.method, "urldata_init"): 1206 if hasattr(self.method, "urldata_init"):
@@ -1596,14 +1596,14 @@ class Fetch(object):
1596 1596
1597 except BBFetchException as e: 1597 except BBFetchException as e:
1598 if isinstance(e, ChecksumError): 1598 if isinstance(e, ChecksumError):
1599 logger.warn("Checksum failure encountered with download of %s - will attempt other sources if available" % u) 1599 logger.warning("Checksum failure encountered with download of %s - will attempt other sources if available" % u)
1600 logger.debug(1, str(e)) 1600 logger.debug(1, str(e))
1601 if os.path.exists(ud.localpath): 1601 if os.path.exists(ud.localpath):
1602 rename_bad_checksum(ud, e.checksum) 1602 rename_bad_checksum(ud, e.checksum)
1603 elif isinstance(e, NoChecksumError): 1603 elif isinstance(e, NoChecksumError):
1604 raise 1604 raise
1605 else: 1605 else:
1606 logger.warn('Failed to fetch URL %s, attempting MIRRORS if available' % u) 1606 logger.warning('Failed to fetch URL %s, attempting MIRRORS if available' % u)
1607 logger.debug(1, str(e)) 1607 logger.debug(1, str(e))
1608 firsterr = e 1608 firsterr = e
1609 # Remove any incomplete fetch 1609 # Remove any incomplete fetch
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index e8d9b11099..d9e46b2e8c 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -251,14 +251,14 @@ class Npm(FetchMethod):
251 with open(shwrf) as datafile: 251 with open(shwrf) as datafile:
252 shrinkobj = json.load(datafile) 252 shrinkobj = json.load(datafile)
253 except: 253 except:
254 logger.warn('Missing shrinkwrap file in NPM_SHRINKWRAP for %s, this will lead to unreliable builds!' % ud.pkgname) 254 logger.warning('Missing shrinkwrap file in NPM_SHRINKWRAP for %s, this will lead to unreliable builds!' % ud.pkgname)
255 lckdf = d.getVar('NPM_LOCKDOWN', True) 255 lckdf = d.getVar('NPM_LOCKDOWN', True)
256 logger.debug(2, "NPM lockdown file is %s" % lckdf) 256 logger.debug(2, "NPM lockdown file is %s" % lckdf)
257 try: 257 try:
258 with open(lckdf) as datafile: 258 with open(lckdf) as datafile:
259 lockdown = json.load(datafile) 259 lockdown = json.load(datafile)
260 except: 260 except:
261 logger.warn('Missing lockdown file in NPM_LOCKDOWN for %s, this will lead to unreproducible builds!' % ud.pkgname) 261 logger.warning('Missing lockdown file in NPM_LOCKDOWN for %s, this will lead to unreproducible builds!' % ud.pkgname)
262 262
263 if ('name' not in shrinkobj): 263 if ('name' not in shrinkobj):
264 self._getdependencies(ud.pkgname, jsondepobj, ud.version, d, ud) 264 self._getdependencies(ud.pkgname, jsondepobj, ud.version, d, ud)
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index 466523c6e4..203c405044 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -220,7 +220,7 @@ class diskMonitor:
220 if minSpace and freeSpace < minSpace: 220 if minSpace and freeSpace < minSpace:
221 # Always show warning, the self.checked would always be False if the action is WARN 221 # Always show warning, the self.checked would always be False if the action is WARN
222 if self.preFreeS[k] == 0 or self.preFreeS[k] - freeSpace > self.spaceInterval and not self.checked[k]: 222 if self.preFreeS[k] == 0 or self.preFreeS[k] - freeSpace > self.spaceInterval and not self.checked[k]:
223 logger.warn("The free space of %s (%s) is running low (%.3fGB left)" % \ 223 logger.warning("The free space of %s (%s) is running low (%.3fGB left)" % \
224 (path, dev, freeSpace / 1024 / 1024 / 1024.0)) 224 (path, dev, freeSpace / 1024 / 1024 / 1024.0))
225 self.preFreeS[k] = freeSpace 225 self.preFreeS[k] = freeSpace
226 226
@@ -246,7 +246,7 @@ class diskMonitor:
246 continue 246 continue
247 # Always show warning, the self.checked would always be False if the action is WARN 247 # Always show warning, the self.checked would always be False if the action is WARN
248 if self.preFreeI[k] == 0 or self.preFreeI[k] - freeInode > self.inodeInterval and not self.checked[k]: 248 if self.preFreeI[k] == 0 or self.preFreeI[k] - freeInode > self.inodeInterval and not self.checked[k]:
249 logger.warn("The free inode of %s (%s) is running low (%.3fK left)" % \ 249 logger.warning("The free inode of %s (%s) is running low (%.3fK left)" % \
250 (path, dev, freeInode / 1024.0)) 250 (path, dev, freeInode / 1024.0))
251 self.preFreeI[k] = freeInode 251 self.preFreeI[k] = freeInode
252 252
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index fbd75b14ad..b9712929f3 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -84,13 +84,13 @@ def include(parentfn, fn, lineno, data, error_out):
84 bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) 84 bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True))
85 abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) 85 abs_fn, attempts = bb.utils.which(bbpath, fn, history=True)
86 if abs_fn and bb.parse.check_dependency(data, abs_fn): 86 if abs_fn and bb.parse.check_dependency(data, abs_fn):
87 logger.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True))) 87 logger.warning("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
88 for af in attempts: 88 for af in attempts:
89 bb.parse.mark_dependency(data, af) 89 bb.parse.mark_dependency(data, af)
90 if abs_fn: 90 if abs_fn:
91 fn = abs_fn 91 fn = abs_fn
92 elif bb.parse.check_dependency(data, fn): 92 elif bb.parse.check_dependency(data, fn):
93 logger.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True))) 93 logger.warning("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
94 94
95 try: 95 try:
96 bb.parse.handle(fn, data, True) 96 bb.parse.handle(fn, data, True)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index e1b9b2e661..1c60d97c7f 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -824,7 +824,7 @@ class RunQueueData:
824 msg += "\n%s has unique rprovides:\n %s" % (provfn, "\n ".join(rprovide_results[provfn] - commonrprovs)) 824 msg += "\n%s has unique rprovides:\n %s" % (provfn, "\n ".join(rprovide_results[provfn] - commonrprovs))
825 825
826 if self.warn_multi_bb: 826 if self.warn_multi_bb:
827 logger.warn(msg) 827 logger.warning(msg)
828 else: 828 else:
829 logger.error(msg) 829 logger.error(msg)
830 830
@@ -852,7 +852,7 @@ class RunQueueData:
852 taskdep = self.dataCache.task_deps[fn] 852 taskdep = self.dataCache.task_deps[fn]
853 fnid = self.taskData.getfn_id(fn) 853 fnid = self.taskData.getfn_id(fn)
854 if taskname not in taskData.tasks_lookup[fnid]: 854 if taskname not in taskData.tasks_lookup[fnid]:
855 logger.warn("Task %s does not exist, invalidating this task will have no effect" % taskname) 855 logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
856 if 'nostamp' in taskdep and taskname in taskdep['nostamp']: 856 if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
857 if error_nostamp: 857 if error_nostamp:
858 bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname) 858 bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname)
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 88fc0f1d5c..21ecd8fbf5 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -221,7 +221,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
221 if taint: 221 if taint:
222 data = data + taint 222 data = data + taint
223 self.taints[k] = taint 223 self.taints[k] = taint
224 logger.warn("%s is tainted from a forced run" % k) 224 logger.warning("%s is tainted from a forced run" % k)
225 225
226 h = hashlib.md5(data).hexdigest() 226 h = hashlib.md5(data).hexdigest()
227 self.taskhash[k] = h 227 self.taskhash[k] = h
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 93979054d5..ff4da78cdb 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -664,8 +664,8 @@ class ORMWrapper(object):
664 dep_type = tdeptype, 664 dep_type = tdeptype,
665 target = target_obj)) 665 target = target_obj))
666 except KeyError as e: 666 except KeyError as e:
667 logger.warn("Could not add dependency to the package %s " 667 logger.warning("Could not add dependency to the package %s "
668 "because %s is an unknown package", p, px) 668 "because %s is an unknown package", p, px)
669 669
670 if len(packagedeps_objs) > 0: 670 if len(packagedeps_objs) > 0:
671 Package_Dependency.objects.bulk_create(packagedeps_objs) 671 Package_Dependency.objects.bulk_create(packagedeps_objs)
@@ -673,7 +673,7 @@ class ORMWrapper(object):
673 logger.info("No package dependencies created") 673 logger.info("No package dependencies created")
674 674
675 if len(errormsg) > 0: 675 if len(errormsg) > 0:
676 logger.warn("buildinfohelper: target_package_info could not identify recipes: \n%s", errormsg) 676 logger.warning("buildinfohelper: target_package_info could not identify recipes: \n%s", errormsg)
677 677
678 def save_target_image_file_information(self, target_obj, file_name, file_size): 678 def save_target_image_file_information(self, target_obj, file_name, file_size):
679 Target_Image_File.objects.create( target = target_obj, 679 Target_Image_File.objects.create( target = target_obj,
@@ -932,7 +932,7 @@ class BuildInfoHelper(object):
932 return lvo 932 return lvo
933 933
934 #if we get here, we didn't read layers correctly; dump whatever information we have on the error log 934 #if we get here, we didn't read layers correctly; dump whatever information we have on the error log
935 logger.warn("Could not match layer version for recipe path %s : %s", path, self.orm_wrapper.layer_version_objects) 935 logger.warning("Could not match layer version for recipe path %s : %s", path, self.orm_wrapper.layer_version_objects)
936 936
937 #mockup the new layer 937 #mockup the new layer
938 unknown_layer, _ = Layer.objects.get_or_create(name="Unidentified layer", layer_index_url="") 938 unknown_layer, _ = Layer.objects.get_or_create(name="Unidentified layer", layer_index_url="")
@@ -1003,7 +1003,7 @@ class BuildInfoHelper(object):
1003 self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)] = layerinfos[layer]['version'] 1003 self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)] = layerinfos[layer]['version']
1004 self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)]['local_path'] = layerinfos[layer]['local_path'] 1004 self.internal_state['lvs'][self.orm_wrapper.get_update_layer_object(layerinfos[layer], self.brbe)]['local_path'] = layerinfos[layer]['local_path']
1005 except NotExisting as nee: 1005 except NotExisting as nee:
1006 logger.warn("buildinfohelper: cannot identify layer exception:%s ", nee) 1006 logger.warning("buildinfohelper: cannot identify layer exception:%s ", nee)
1007 1007
1008 1008
1009 def store_started_build(self, event, build_log_path): 1009 def store_started_build(self, event, build_log_path):
@@ -1240,14 +1240,14 @@ class BuildInfoHelper(object):
1240 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'], built_package=True) 1240 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'], built_package=True)
1241 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata.copy(), pkgdata, self.internal_state['recipes'], built_package=False) 1241 self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata.copy(), pkgdata, self.internal_state['recipes'], built_package=False)
1242 except KeyError as e: 1242 except KeyError as e:
1243 logger.warn("KeyError in save_target_package_information" 1243 logger.warning("KeyError in save_target_package_information"
1244 "%s ", e) 1244 "%s ", e)
1245 1245
1246 try: 1246 try:
1247 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata) 1247 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata)
1248 except KeyError as e: 1248 except KeyError as e:
1249 logger.warn("KeyError in save_target_file_information" 1249 logger.warning("KeyError in save_target_file_information"
1250 "%s ", e) 1250 "%s ", e)
1251 1251
1252 1252
1253 1253
@@ -1392,7 +1392,7 @@ class BuildInfoHelper(object):
1392 Task_Dependency.objects.bulk_create(taskdeps_objects) 1392 Task_Dependency.objects.bulk_create(taskdeps_objects)
1393 1393
1394 if len(errormsg) > 0: 1394 if len(errormsg) > 0:
1395 logger.warn("buildinfohelper: dependency info not identify recipes: \n%s", errormsg) 1395 logger.warning("buildinfohelper: dependency info not identify recipes: \n%s", errormsg)
1396 1396
1397 1397
1398 def store_build_package_information(self, event): 1398 def store_build_package_information(self, event):
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 268562770a..903d72b565 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -350,7 +350,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
350 tries -= 1 350 tries -= 1
351 if tries: 351 if tries:
352 continue 352 continue
353 logger.warn(event.msg) 353 logger.warning(event.msg)
354 continue 354 continue
355 355
356 if isinstance(event, logging.LogRecord): 356 if isinstance(event, logging.LogRecord):
@@ -377,7 +377,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
377 continue 377 continue
378 378
379 if isinstance(event, bb.build.TaskFailedSilent): 379 if isinstance(event, bb.build.TaskFailedSilent):
380 logger.warn("Logfile for failed setscene task is %s" % event.logfile) 380 logger.warning("Logfile for failed setscene task is %s" % event.logfile)
381 continue 381 continue
382 if isinstance(event, bb.build.TaskFailed): 382 if isinstance(event, bb.build.TaskFailed):
383 return_value = 1 383 return_value = 1
@@ -509,8 +509,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
509 continue 509 continue
510 510
511 if isinstance(event, bb.runqueue.sceneQueueTaskFailed): 511 if isinstance(event, bb.runqueue.sceneQueueTaskFailed):
512 logger.warn("Setscene task %s (%s) failed with exit code '%s' - real task will be run instead", 512 logger.warning("Setscene task %s (%s) failed with exit code '%s' - real task will be run instead",
513 event.taskid, event.taskstring, event.exitcode) 513 event.taskid, event.taskstring, event.exitcode)
514 continue 514 continue
515 515
516 if isinstance(event, bb.event.DepTreeGenerated): 516 if isinstance(event, bb.event.DepTreeGenerated):
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 6bf4c1f030..addd5cc2fa 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -163,7 +163,7 @@ def main(server, eventHandler, params):
163 inheritlist, _ = server.runCommand(["getVariable", "INHERIT"]) 163 inheritlist, _ = server.runCommand(["getVariable", "INHERIT"])
164 164
165 if not "buildhistory" in inheritlist.split(" "): 165 if not "buildhistory" in inheritlist.split(" "):
166 logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.") 166 logger.warning("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
167 build_history_enabled = False 167 build_history_enabled = False
168 168
169 if not params.observe_only: 169 if not params.observe_only:
@@ -433,7 +433,7 @@ def main(server, eventHandler, params):
433 buildinfohelper.store_dependency_information(event) 433 buildinfohelper.store_dependency_information(event)
434 continue 434 continue
435 435
436 logger.warn("Unknown event: %s", event) 436 logger.warning("Unknown event: %s", event)
437 return_value += 1 437 return_value += 1
438 438
439 except EnvironmentError as ioerror: 439 except EnvironmentError as ioerror:
@@ -461,5 +461,5 @@ def main(server, eventHandler, params):
461 if interrupted and return_value == 0: 461 if interrupted and return_value == 0:
462 return_value += 1 462 return_value += 1
463 463
464 logger.warn("Return value is %d", return_value) 464 logger.warning("Return value is %d", return_value)
465 return return_value 465 return return_value
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 5e735d3fa7..2abf518ece 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -822,7 +822,7 @@ def copyfile(src, dest, newmtime = None, sstat = None):
822 if not sstat: 822 if not sstat:
823 sstat = os.lstat(src) 823 sstat = os.lstat(src)
824 except Exception as e: 824 except Exception as e:
825 logger.warn("copyfile: stat of %s failed (%s)" % (src, e)) 825 logger.warning("copyfile: stat of %s failed (%s)" % (src, e))
826 return False 826 return False
827 827
828 destexists = 1 828 destexists = 1
@@ -849,7 +849,7 @@ def copyfile(src, dest, newmtime = None, sstat = None):
849 #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) 849 #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
850 return os.lstat(dest) 850 return os.lstat(dest)
851 except Exception as e: 851 except Exception as e:
852 logger.warn("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e)) 852 logger.warning("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e))
853 return False 853 return False
854 854
855 if stat.S_ISREG(sstat[stat.ST_MODE]): 855 if stat.S_ISREG(sstat[stat.ST_MODE]):
@@ -864,7 +864,7 @@ def copyfile(src, dest, newmtime = None, sstat = None):
864 shutil.copyfile(src, dest + "#new") 864 shutil.copyfile(src, dest + "#new")
865 os.rename(dest + "#new", dest) 865 os.rename(dest + "#new", dest)
866 except Exception as e: 866 except Exception as e:
867 logger.warn("copyfile: copy %s to %s failed (%s)" % (src, dest, e)) 867 logger.warning("copyfile: copy %s to %s failed (%s)" % (src, dest, e))
868 return False 868 return False
869 finally: 869 finally:
870 if srcchown: 870 if srcchown:
@@ -875,13 +875,13 @@ def copyfile(src, dest, newmtime = None, sstat = None):
875 #we don't yet handle special, so we need to fall back to /bin/mv 875 #we don't yet handle special, so we need to fall back to /bin/mv
876 a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'") 876 a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'")
877 if a[0] != 0: 877 if a[0] != 0:
878 logger.warn("copyfile: failed to copy special file %s to %s (%s)" % (src, dest, a)) 878 logger.warning("copyfile: failed to copy special file %s to %s (%s)" % (src, dest, a))
879 return False # failure 879 return False # failure
880 try: 880 try:
881 os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID]) 881 os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID])
882 os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown 882 os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
883 except Exception as e: 883 except Exception as e:
884 logger.warn("copyfile: failed to chown/chmod %s (%s)" % (dest, e)) 884 logger.warning("copyfile: failed to chown/chmod %s (%s)" % (dest, e))
885 return False 885 return False
886 886
887 if newmtime: 887 if newmtime:
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 7def1f3a17..7b2f126e98 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -66,7 +66,7 @@ class LocalhostBEController(BuildEnvironmentController):
66 err = "command: %s \n%s" % (command, out) 66 err = "command: %s \n%s" % (command, out)
67 else: 67 else:
68 err = "command: %s \n%s" % (command, err) 68 err = "command: %s \n%s" % (command, err)
69 logger.warn("localhostbecontroller: shellcmd error %s" % err) 69 logger.warning("localhostbecontroller: shellcmd error %s" % err)
70 raise ShellCmdException(err) 70 raise ShellCmdException(err)
71 else: 71 else:
72 logger.debug("localhostbecontroller: shellcmd success") 72 logger.debug("localhostbecontroller: shellcmd success")
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 27289be5fd..5532b9deb2 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -164,16 +164,16 @@ class Command(NoArgsCommand):
164 try: 164 try:
165 self.cleanup() 165 self.cleanup()
166 except Exception as e: 166 except Exception as e:
167 logger.warn("runbuilds: cleanup exception %s" % str(e)) 167 logger.warning("runbuilds: cleanup exception %s" % str(e))
168 168
169 try: 169 try:
170 self.archive() 170 self.archive()
171 except Exception as e: 171 except Exception as e:
172 logger.warn("runbuilds: archive exception %s" % str(e)) 172 logger.warning("runbuilds: archive exception %s" % str(e))
173 173
174 try: 174 try:
175 self.schedule() 175 self.schedule()
176 except Exception as e: 176 except Exception as e:
177 logger.warn("runbuilds: schedule exception %s" % str(e)) 177 logger.warning("runbuilds: schedule exception %s" % str(e))
178 178
179 time.sleep(1) 179 time.sleep(1)
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index cb49a58c45..e09ad20dc3 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -98,11 +98,11 @@ class BuildRequest(models.Model):
98 # Check that the state we're trying to set is not going backwards 98 # Check that the state we're trying to set is not going backwards
99 # e.g. from REQ_FAILED to REQ_INPROGRESS 99 # e.g. from REQ_FAILED to REQ_INPROGRESS
100 if self.old_state != self.state and self.old_state > self.state: 100 if self.old_state != self.state and self.old_state > self.state:
101 logger.warn("Invalid state change requested: " 101 logger.warning("Invalid state change requested: "
102 "Cannot go from %s to %s - ignoring request" % 102 "Cannot go from %s to %s - ignoring request" %
103 (BuildRequest.REQUEST_STATE[self.old_state][1], 103 (BuildRequest.REQUEST_STATE[self.old_state][1],
104 BuildRequest.REQUEST_STATE[self.state][1]) 104 BuildRequest.REQUEST_STATE[self.state][1])
105 ) 105 )
106 # Set property back to the old value 106 # Set property back to the old value
107 self.state = self.old_state 107 self.state = self.old_state
108 return 108 return
diff --git a/bitbake/lib/toaster/contrib/tts/shellutils.py b/bitbake/lib/toaster/contrib/tts/shellutils.py
index c2012edf83..ce64c06340 100644
--- a/bitbake/lib/toaster/contrib/tts/shellutils.py
+++ b/bitbake/lib/toaster/contrib/tts/shellutils.py
@@ -133,7 +133,7 @@ def run_shell_cmd(command, cwd=None):
133 err = "command: %s \n%s" % (command, out) 133 err = "command: %s \n%s" % (command, out)
134 else: 134 else:
135 err = "command: %s \n%s" % (command, err) 135 err = "command: %s \n%s" % (command, err)
136 config.logger.warn("_shellcmd: error \n%s\n%s", out, err) 136 config.logger.warning("_shellcmd: error \n%s\n%s", out, err)
137 raise ShellCmdException(err) 137 raise ShellCmdException(err)
138 else: 138 else:
139 #config.logger.debug("localhostbecontroller: shellcmd success\n%s" % out) 139 #config.logger.debug("localhostbecontroller: shellcmd success\n%s" % out)
diff --git a/bitbake/lib/toaster/contrib/tts/urlcheck.py b/bitbake/lib/toaster/contrib/tts/urlcheck.py
index 0820f82e2a..001fcee96a 100644
--- a/bitbake/lib/toaster/contrib/tts/urlcheck.py
+++ b/bitbake/lib/toaster/contrib/tts/urlcheck.py
@@ -26,12 +26,12 @@ def validate_html5(url):
26 warnings = int(resp['x-w3c-validator-warnings']) 26 warnings = int(resp['x-w3c-validator-warnings'])
27 27
28 if status == 'Invalid': 28 if status == 'Invalid':
29 config.logger.warn("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest) 29 config.logger.warning("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest)
30 else: 30 else:
31 config.logger.debug("OK! %s", url) 31 config.logger.debug("OK! %s", url)
32 32
33 except Exception as exc: 33 except Exception as exc:
34 config.logger.warn("Failed validation call: %s", exc) 34 config.logger.warning("Failed validation call: %s", exc)
35 return (status, errors, warnings) 35 return (status, errors, warnings)
36 36
37 37
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index 534679dc50..530a42ffab 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -84,7 +84,7 @@ for t in os.walk(os.path.dirname(currentdir)):
84 if not conflict: 84 if not conflict:
85 urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls'))) 85 urlpatterns.insert(0, url(r'^' + modulename + '/', include ( modulename + '.urls')))
86 else: 86 else:
87 logger.warn("Module \'%s\' has a regexp conflict, was not added to the urlpatterns" % modulename) 87 logger.warning("Module \'%s\' has a regexp conflict, was not added to the urlpatterns" % modulename)
88 88
89from pprint import pformat 89from pprint import pformat
90#logger.debug("urlpatterns list %s", pformat(urlpatterns)) 90#logger.debug("urlpatterns list %s", pformat(urlpatterns))