summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/commands.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-05-18 16:15:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-20 21:41:04 +0100
commitfbfc06a969200e582a059c9943e6fd17aca70e30 (patch)
tree1862fb721f550d42f10e8867224712754a865d34 /meta/lib/oeqa/utils/commands.py
parentc63adf5c5b4b5984c315e914a7d3cb4b51040602 (diff)
downloadpoky-fbfc06a969200e582a059c9943e6fd17aca70e30.tar.gz
recipetool: add appendfile subcommand
Locating which recipe provides a file in an image that you want to modify and then figuring out how to bbappend the recipe in order to replace it can be a tedious process. Thus, add a new appendfile subcommand to recipetool, providing the ability to create a bbappend file to add/replace any file in the target system. Without the -r option, it will search for the recipe packaging the specified file (using pkgdata from previously built recipes). The bbappend will be created at the appropriate path within the specified layer directory (which may or may not be in your bblayers.conf) or if one already exists it will be updated appropriately. Fairly extensive oe-selftest tests are also provided. Implements [YOCTO #6447]. (From OE-Core rev: dd2aa93b3c13d2c6464ef0fda59620c7dba450bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/commands.py')
-rw-r--r--meta/lib/oeqa/utils/commands.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 663e4e7f41..dc8a9836e7 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -162,3 +162,14 @@ def get_test_layer():
162 testlayer = l 162 testlayer = l
163 break 163 break
164 return testlayer 164 return testlayer
165
166def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec='recipes-*/*'):
167 os.makedirs(os.path.join(templayerdir, 'conf'))
168 with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f:
169 f.write('BBPATH .= ":${LAYERDIR}"\n')
170 f.write('BBFILES += "${LAYERDIR}/%s/*.bb \\' % recipepathspec)
171 f.write(' ${LAYERDIR}/%s/*.bbappend"\n' % recipepathspec)
172 f.write('BBFILE_COLLECTIONS += "%s"\n' % templayername)
173 f.write('BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' % templayername)
174 f.write('BBFILE_PRIORITY_%s = "%d"\n' % (templayername, priority))
175 f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)