summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2014-08-20 08:23:27 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-24 10:00:55 +0100
commit587b144ee409d444494d8d7f2d1c53ede8f7c953 (patch)
tree611ecb4b57b8acb0fbcfc97b4de3fc35dbdcc8fb
parent984ad90b2f1e29634dc79803a4a0404ab0534039 (diff)
downloadbitbake-contrib-587b144ee409d444494d8d7f2d1c53ede8f7c953.tar.gz
bitbake-contrib-587b144ee409d444494d8d7f2d1c53ede8f7c953.tar.bz2
bitbake-contrib-587b144ee409d444494d8d7f2d1c53ede8f7c953.zip
lib/bb/*.py: Typo fixes/grammar/comment fixes, nothing functional.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/__init__.py2
-rw-r--r--lib/bb/build.py11
-rw-r--r--lib/bb/cache.py4
-rw-r--r--lib/bb/daemonize.py9
-rw-r--r--lib/bb/data.py6
-rw-r--r--lib/bb/event.py4
-rw-r--r--lib/bb/monitordisk.py12
-rw-r--r--lib/bb/namedtuple_with_abc.py4
-rw-r--r--lib/bb/utils.py4
9 files changed, 29 insertions, 27 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 84f6ec3f3c..001941a29d 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -103,7 +103,7 @@ def fatal(*args):
def deprecated(func, name=None, advice=""):
"""This is a decorator which can be used to mark functions
- as deprecated. It will result in a warning being emmitted
+ as deprecated. It will result in a warning being emitted
when the function is used."""
import warnings
diff --git a/lib/bb/build.py b/lib/bb/build.py
index dcd42ef8cf..f2922f3087 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -23,7 +23,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-#Based on functions from the base bb module, Copyright 2003 Holger Schurig
+# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import os
import sys
@@ -42,9 +42,8 @@ logger = logging.getLogger('BitBake.Build')
NULL = open(os.devnull, 'r+')
-
-# When we execute a python function we'd like certain things
-# in all namespaces, hence we add them to __builtins__
+# When we execute a Python function, we'd like certain things
+# in all namespaces, hence we add them to __builtins__.
# If we do not do this and use the exec globals, they will
# not be available to subfunctions.
__builtins__['bb'] = bb
@@ -143,7 +142,7 @@ class LogTee(object):
self.outfile.flush()
def exec_func(func, d, dirs = None):
- """Execute an BB 'function'"""
+ """Execute a BB 'function'"""
body = d.getVar(func)
if not body:
@@ -417,7 +416,7 @@ def _exec_task(fn, task, d, quieterr):
os.dup2(logfile.fileno(), oso[1])
os.dup2(logfile.fileno(), ose[1])
- # Ensure python logging goes to the logfile
+ # Ensure Python logging goes to the logfile
handler = logging.StreamHandler(logfile)
handler.setFormatter(logformatter)
# Always enable full debug output into task logfiles
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index f892d7dc32..ac0c27f922 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -225,7 +225,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
for package in self.packages_dynamic:
cachedata.packages_dynamic[package].append(fn)
- # Build hash of runtime depends and rececommends
+ # Build hash of runtime depends and recommends
for package in self.packages + [self.pn]:
cachedata.rundeps[fn][package] = list(self.rdepends) + self.rdepends_pkg[package]
cachedata.runrecs[fn][package] = list(self.rrecommends) + self.rrecommends_pkg[package]
@@ -261,7 +261,7 @@ class Cache(object):
def __init__(self, data, data_hash, caches_array):
# Pass caches_array information into Cache Constructor
- # It will be used in later for deciding whether we
+ # It will be used later for deciding whether we
# need extra cache file dump/load support
self.caches_array = caches_array
self.cachedir = data.getVar("CACHE", True)
diff --git a/lib/bb/daemonize.py b/lib/bb/daemonize.py
index 898820b069..346a618582 100644
--- a/lib/bb/daemonize.py
+++ b/lib/bb/daemonize.py
@@ -12,8 +12,11 @@ A failed call to fork() now raises an exception.
References:
1) Advanced Programming in the Unix Environment: W. Richard Stevens
- 2) Unix Programming Frequently Asked Questions:
- http://www.erlenstar.demon.co.uk/unix/faq_toc.html
+ http://www.apuebook.com/apue3e.html
+ 2) The Linux Programming Interface: Michael Kerrisk
+ http://man7.org/tlpi/index.html
+ 3) Unix Programming Frequently Asked Questions:
+ http://www.faqs.org/faqs/unix-faq/programmer/faq/
Modified to allow a function to be daemonized and return for
bitbake use by Richard Purdie
@@ -146,7 +149,7 @@ def createDaemon(function, logfile):
# OR
#
# Use the getrlimit method to retrieve the maximum file descriptor number
- # that can be opened by this process. If there is not limit on the
+ # that can be opened by this process. If there is no limit on the
# resource, use the default value.
#
import resource # Resource usage information.
diff --git a/lib/bb/data.py b/lib/bb/data.py
index db938be1e6..3d776b32bf 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -6,7 +6,7 @@ BitBake 'Data' implementations
Functions for interacting with the data structure used by the
BitBake build tools.
-The expandData and update_data are the most expensive
+The expandKeys and update_data are the most expensive
operations. At night the cookie monster came by and
suggested 'give me cookies on setting the variables and
things will work out'. Taking this suggestion into account
@@ -15,7 +15,7 @@ Analyse von Algorithmen' lecture and the cookie
monster seems to be right. We will track setVar more carefully
to have faster update_data and expandKeys operations.
-This is a treade-off between speed and memory again but
+This is a trade-off between speed and memory again but
the speed is more critical here.
"""
@@ -35,7 +35,7 @@ the speed is more critical here.
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-#Based on functions from the base bb module, Copyright 2003 Holger Schurig
+# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import sys, os, re
if sys.argv[0][-5:] == "pydoc":
diff --git a/lib/bb/event.py b/lib/bb/event.py
index e2f6b9cad2..32df779786 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -598,7 +598,7 @@ class MetadataEvent(Event):
class SanityCheck(Event):
"""
- Event to runs sanity checks, either raise errors or generate events as return status.
+ Event to run sanity checks, either raise errors or generate events as return status.
"""
def __init__(self, generateevents = True):
Event.__init__(self)
@@ -606,7 +606,7 @@ class SanityCheck(Event):
class SanityCheckPassed(Event):
"""
- Event to indicate sanity check is passed
+ Event to indicate sanity check has passed
"""
class SanityCheckFailed(Event):
diff --git a/lib/bb/monitordisk.py b/lib/bb/monitordisk.py
index fca43eefd0..6b03682584 100644
--- a/lib/bb/monitordisk.py
+++ b/lib/bb/monitordisk.py
@@ -52,10 +52,10 @@ def getMountedDev(path):
parentDev = os.stat(path).st_dev
currentDev = parentDev
# When the current directory's device is different from the
- # parrent's, then the current directory is a mount point
+ # parent's, then the current directory is a mount point
while parentDev == currentDev:
mountPoint = path
- # Use dirname to get the parrent's directory
+ # Use dirname to get the parent's directory
path = os.path.dirname(path)
# Reach the "/"
if path == mountPoint:
@@ -77,7 +77,7 @@ def getDiskData(BBDirs, configuration):
"""Prepare disk data for disk space monitor"""
# Save the device IDs, need the ID to be unique (the dictionary's key is
- # unique), so that when more than one directories are located in the same
+ # unique), so that when more than one directory is located on the same
# device, we just monitor it once
devDict = {}
for pathSpaceInode in BBDirs.split():
@@ -187,11 +187,11 @@ class diskMonitor:
if self.spaceInterval and self.inodeInterval:
self.enableMonitor = True
# These are for saving the previous disk free space and inode, we
- # use them to avoid print too many warning messages
+ # use them to avoid printing too many warning messages
self.preFreeS = {}
self.preFreeI = {}
- # This is for STOPTASKS and ABORT, to avoid print the message repeatly
- # during waiting the tasks to finish
+ # This is for STOPTASKS and ABORT, to avoid printing the message
+ # repeatedly while waiting for the tasks to finish
self.checked = {}
for k in self.devDict:
self.preFreeS[k] = 0
diff --git a/lib/bb/namedtuple_with_abc.py b/lib/bb/namedtuple_with_abc.py
index f5e0a3f3d5..32f2fc642c 100644
--- a/lib/bb/namedtuple_with_abc.py
+++ b/lib/bb/namedtuple_with_abc.py
@@ -202,8 +202,8 @@ if __name__ == '__main__':
print(rec5._replace(k=222)._my_custom_method()) # MyMixIn's
print(rec5._replace(k=222).count(2)) # MyMixIn's
- # None that behavior: the standard namedtuple methods cannot be
- # overriden by a foreign mix-in -- even if the mix-in is declared
+ # Note that behavior: the standard namedtuple methods cannot be
+ # overridden by a foreign mix-in -- even if the mix-in is declared
# as the leftmost base class (but, obviously, you can override them
# in the defined class or its subclasses):
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 4c894cbb0c..7d37a745a4 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -264,7 +264,7 @@ def _print_trace(body, line):
def better_compile(text, file, realfile, mode = "exec"):
"""
A better compile method. This method
- will print the offending lines.
+ will print the offending lines.
"""
try:
return compile(text, file, mode)
@@ -530,7 +530,7 @@ def filter_environment(good_vars):
def approved_variables():
"""
Determine and return the list of whitelisted variables which are approved
- to remain in the envrionment.
+ to remain in the environment.
"""
if 'BB_PRESERVE_ENV' in os.environ:
return os.environ.keys()