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