From: Mark Hatle <mark.hatle@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 2/4] build.py: Cleanup exec_func_shell
Date: Wed, 23 May 2012 10:45:10 -0500 [thread overview]
Message-ID: <1337787916-591-2-git-send-email-mark.hatle@windriver.com> (raw)
In-Reply-To: <cover.1337714416.git.mark.hatle@windriver.com>
exec_func_python and exec_func_shell are similar, but variable
usage has diverged sync the two up. Since exec_func_python is first
use that as the guide for the later exec_func_shell variable naming.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
lib/bb/build.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 4f06b15..9f2c6a7 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -221,7 +221,7 @@ def exec_func_python(func, d, runfile, cwd=None):
except OSError:
pass
-def exec_func_shell(function, d, runfile, cwd=None):
+def exec_func_shell(func, d, runfile, cwd=None):
"""Execute a shell function from the metadata
Note on directory behavior. The 'dirs' varflag should contain a list
@@ -234,18 +234,18 @@ def exec_func_shell(function, d, runfile, cwd=None):
with open(runfile, 'w') as script:
script.write('#!/bin/sh -e\n')
- data.emit_func(function, script, d)
+ data.emit_func(func, script, d)
if bb.msg.loggerVerboseLogs:
script.write("set -x\n")
if cwd:
script.write("cd %s\n" % cwd)
- script.write("%s\n" % function)
+ script.write("%s\n" % func)
os.chmod(runfile, 0775)
cmd = runfile
- if d.getVarFlag(function, 'fakeroot'):
+ if d.getVarFlag(func, 'fakeroot'):
fakerootcmd = d.getVar('FAKEROOT', True)
if fakerootcmd:
cmd = [fakerootcmd, runfile]
@@ -259,7 +259,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
bb.process.run(cmd, shell=False, stdin=NULL, log=logfile)
except bb.process.CmdError:
logfn = d.getVar('BB_LOGFILE', True)
- raise FuncFailed(function, logfn)
+ raise FuncFailed(func, logfn)
def _task_data(fn, task, d):
localdata = data.createCopy(d)
--
1.7.3.4
next prev parent reply other threads:[~2012-05-23 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-23 1:46 [PATCH 0/3] RFC: Refactor/cleanup logging/run file generation Mark Hatle
2012-05-23 0:06 ` [PATCH 1/3] build.py: Add a log to capture task execution order Mark Hatle
2012-05-23 0:06 ` [PATCH 2/3] build.py: Add additional debug messages Mark Hatle
2012-05-23 0:06 ` [PATCH 3/3] build.py: Add support for log and run filename changes Mark Hatle
2012-05-23 1:46 ` [PATCH 1/3] build.py: Add a log to capture task execution order Mark Hatle
2012-05-23 1:46 ` [PATCH 2/3] build.py: Add additional debug messages Mark Hatle
2012-05-23 13:50 ` Richard Purdie
2012-05-23 1:46 ` [PATCH 3/3] build.py: Add support for log and run filename changes Mark Hatle
2012-05-23 15:45 ` [PATCH 1/4] build.py: Add a log to capture task execution order Mark Hatle
2012-05-23 17:15 ` Richard Purdie
2012-05-23 15:45 ` Mark Hatle [this message]
2012-05-23 15:45 ` [PATCH 3/4] build.py: Add additional debug messages Mark Hatle
2012-05-23 15:45 ` [PATCH 4/4] build.py: Add support for log and run filename changes Mark Hatle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337787916-591-2-git-send-email-mark.hatle@windriver.com \
--to=mark.hatle@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox