summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
Commit message (Collapse)AuthorAgeFilesLines
* meta: remove True option to getVar callsJoshua Lock2016-12-161-19/+19
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: drop parse_recipe_simple()Paul Eggleton2016-12-141-22/+0
| | | | | | | | | | | | This was intended to be used with tinfoil, but tinfoil now has its own parse_recipe() method to do this which works properly in the memres case. (From OE-Core rev: cdfc6173cb06ca374b7d927442a0fdde8373ba48) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/patch: move several functions to oe.patchPaul Eggleton2016-12-141-7/+5
| | | | | | | | | | | | Move patch_path(), src_patches() and should_apply() to oe.patch, making them easier to call from elsewhere (particularly across the UI/server boundary). (From OE-Core rev: 2724511e18810cc8082c1b028e3b7c8a8b5def56) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: use cooker function instead of bb.providersPaul Eggleton2016-12-141-11/+2
| | | | | | | | | | | | | We now have a function in cooker itself that can do this lookup; additionally, the rewritten tinfoil's cooker adapter has its own implementation that can work remotely, so if we use it then this function can work in that scenario as well. (From OE-Core rev: 0a6a4be99c1e4ef3c0da53d63f18ad579545d6a8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: ignore archives by default in get_recipe_local_files()Paul Eggleton2016-11-231-2/+14
| | | | | | | | | | | | | | | By default, have get_recipe_local_files() not return any archive files. This prevents a local tarball from being erroneously removed from SRC_URI if you run "devtool modify" on a recipe followed by "devtool update-recipe". It doesn't actually help you to directly update the contents of such tarballs, but at least now it won't break the recipe. (From OE-Core rev: e9c418d4704c1bed4c5880e176e5288485f4f5a6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: fix handling of compressed local patchesPaul Eggleton2016-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | It is possible to use gzip or bzip2 to compress patches and still refer to them in compressed form in the SRC_URI value within a recipe. If you run "devtool modify" on such a recipe, make changes to the commit for the patch and then run devtool update-recipe, we need to correctly associate the commit back to the compressed patch file and re-compress the patch, neither of which we were doing previously. Additionally, add an oe-selftest test to ensure this doesn't regress in future. Fixes [YOCTO #8278]. (From OE-Core rev: e47d21624dfec6f71742b837e91da553f18a28c5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dirPaul Eggleton2016-11-061-1/+5
| | | | | | | | | | | | | | | If you use devtool update-recipe with the --append option, and a "local" (in oe-local-files) has been modified we copy it into the specified destination layer. With the way the devtool update-recipe code works now the source is always a temp directory, and printing paths from within that is just confusing, so if the path starts with the temp directory then just print the file name alone. (From OE-Core rev: 61475f0267d40c618ebf36023d0b6414a25975cb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: fix invalid character detection in validate_pn()Paul Eggleton2016-09-201-2/+2
| | | | | | | | | | | | | * validate_pn() is supposed to protect against invalid characters, fix the function so that it actually does (unanchored regex strikes again...) * However, now that the function is enforcing the restrictions, we do still want to allow + in recipe names (e.g. "gtk+") (From OE-Core rev: c5d5a1baf98a11676537fb5e9f8ec4409e30c1fd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: support files with subdir=Paul Eggleton2016-09-081-2/+10
| | | | | | | | | | | | | | | | | | | | | It's rare but there are recipes that have individual files (as opposed to archives) in SRC_URI using subdir= to put them under the source tree, the examples in OE-Core being bzip2 and openssl. This broke devtool update-recipe (and devtool finish) because the file wasn't unpacked into the oe-local-files directory and thus when it came time to update the recipe, the file was assumed to have been deleted by the user and thus the file was erroneously removed. Add logic to handle these properly so that this doesn't happen. (We still have another potential problem in that these files become part of the initial commit from upstream, which could be confusing because they didn't come from there - but that's a separate issue and not one that is trivially solved.) (From OE-Core rev: 9069fef5dad5a873c8a8f720f7bcbc7625556309) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/recipetool/meta: Adapt to bitbake API changes for ↵Richard Purdie2016-08-181-9/+10
| | | | | | | | | | | | | | multi-configuration builds Unfortunately to implenent multiconfig support in bitbake some APIs had to change. This updates code in OE to match the changes in bitbake. Its mostly periperhal changes around devtool/recipetool [Will need a bitbake version requirement bump which I'll make when merging] (From OE-Core rev: 041212fa37bb83acac5ce4ceb9b7b77ad172c5c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: fix patch_recipe*() with empty inputPaul Eggleton2016-07-261-1/+1
| | | | | | | | | | | | | | | If you supplied an empty file to patch_recipe() (or an empty list to patch_recipe_lines()) then the result was IndexError because the code checking to see if it needed to add an extra line of padding didn't check to see if there were in fact any lines before trying to access the last line. Fixes [YOCTO #9972]. (From OE-Core rev: 92a73e870478ddb2a2d137e3fff28828809bec2e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add finish subcommandPaul Eggleton2016-07-201-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a subcommand which will "finish" the work on a recipe. This is effectively the same as update-recipe followed by reset, except that the destination layer is required and it will do the right thing depending on the situation - if the recipe file itself is in the workspace (e.g. as a result of devtool add), the recipe file and any associated files will be moved to the destination layer; or if the destination layer is the one containing the original recipe, the recipe will be overwritten; otherwise a bbappend will be created to apply the changes. In all cases the layer path can be loosely specified - it could be a layer name, or a partial path into a recipe. In the case of upgrades, devtool finish will also take care of deleting the old recipe. This avoids the user having to figure out the correct actions when they're done - they just do "devtool finish recipename layername" and it saves their work and then removes the recipe from the workspace. Addresses [YOCTO #8594]. (From OE-Core rev: fa550fcb9333d59b28fc0e4aebde888831410f5c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: record original recipe filesPaul Eggleton2016-07-201-1/+3
| | | | | | | | | | | | This provides us with the information we need to remove the original version recipe and associated files when running "devtool finish" after "devtool upgrade". (From OE-Core rev: 92eb42c347af919cd9f8739515fdf806c12b5ba8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: fix a few issues in find_layerdir()Paul Eggleton2016-07-201-2/+4
| | | | | | | | | | | | | | * Allow the function to be called with the base layer path (in which case it will just return the same path) * Ensure that the function doesn't recurse indefinitely if it's called on a file that's not inside a layer * Correct the doc comment for accuracy (From OE-Core rev: 912026d85c2f535be2f60c45979162ea25c7f356) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-2/+2
| | | | | | | | | This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix deprecated dict methods for python3Ed Bartosh2016-06-021-2/+2
| | | | | | | | | | Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' (From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update xrange -> range for python3Richard Purdie2016-06-021-2/+2
| | | | | | | | xrange() no longer exists in python 3, use range() (From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to explictly create lists where neededRichard Purdie2016-06-021-3/+3
| | | | | | | | | Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. (From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to match python3 iter requirementsRichard Purdie2016-06-021-4/+4
| | | | | | | | | python3 standardises its use of iteration operations. Update the code to match the for python3 requires. (From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: fix insertion of variable valuesPaul Eggleton2016-06-011-1/+1
| | | | | | | | | | | Add some more variables in appropriate places in recipe_progression such that the patch_recipe_* functions are able to insert variables in the right place within a recipe. (From OE-Core rev: c33ba6cc5d14b1da96f6d906836c50e0346dcf06) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: patch_recipe_lines: allow omitting trailing newlinesPaul Eggleton2016-06-011-6/+11
| | | | | | | | | | | | | | This function was assuming that what you wanted was that output lines had trailing newline characters. If you're just outputting each line verbatim to a text file then that's fine, but sometimes you start with the assumption that the lines don't have trailing newlines; thus we shouldn't allow for the possibility that the caller doesn't want them and add a parameter to control it. (From OE-Core rev: fb2bb509ff5c7bd71b41a1dcba3b1bff1d18cf5d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: split out patch_recipe_lines()Paul Eggleton2016-06-011-5/+18
| | | | | | | | | | | Split out a function from patch_recipe_file() that takes just the lines as input so we can edit recipe lines in memory. This will be used within recipetool to ensure we insert new values in the right place. (From OE-Core rev: d780642f950fb3a9699f466a405a2710d870dd08) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: handle where SRC_URI is appended to with +=Paul Eggleton2016-04-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | If a recipe sets SRC_URI and then appends more items to it with += (such as the current rpm recipe in OE-Core), the code in patch_recipe_file() was failing with a traceback. Work around the problem for now by dropping the existing lines if we understand the operation, else just set the value outright at the end. This leaves something to be desired as it either doesn't respect the existing structure or leaves a mess but it's better than the current breakage. We'll need to come up with a better solution later. Part of the problem is the existing code structure doesn't allow for patch_recipe_file() to know what's being added or removed - it only knows the final value that the caller wants set. Fixes [YOCTO #9458]. (From OE-Core rev: da5cd84794e1ab5c4efcd6250d3b93a46f610744) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: refactor patch_recipe_file() to use edit_metadata()Paul Eggleton2015-12-011-67/+93
| | | | | | | | | | | | | | | | | Use bb.utils.edit_metadata() to replace some of the logic in this function; this avoids us effectively having two implementations of the same thing. In the process fix the following issues: * Insert values before any leading comments for the next variable instead of after them * Insert overridden variables (e.g. RDEPENDS_${PN}) in the correct place * Properly handle replacing varflag settings (e.g. SRC_URI[md5sum]) (From OE-Core rev: 0f81b83fc5fd908efa7f6b837137830ca65f6ed6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: check in validate_pn() for names instead of filenamesPaul Eggleton2015-12-011-0/+2
| | | | | | | | | | | | Ensure that the user specifies just the name portion instead of a file name with extension. (We can't just look for . since there are recipe names such as "glib-2.0" that legitimately contain .). (From OE-Core rev: a4c6af737811adb2bca87e3896f8710738dd255e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: handle virtual providersPaul Eggleton2015-10-211-1/+5
| | | | | | | | | | | | | | For modify / extract / upgrade, if the specified "recipe" is not actually a recipe but a virtual target such as virtual/kernel, map it correctly to the actual recipe and make sure we use that name within the workspace. Thanks to Chris Larson for reminding me this was still broken and for a hint on how to fix it. (From OE-Core rev: 1f7752282ffb47d2621030ddb2fa42a5e491d6d2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils: implement get_recipe_local_files()Markus Lehtonen2015-10-011-0/+16
| | | | | | | (From OE-Core rev: c94cf6e6e8a0645c822a708a432901dcb5ce5bf4) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils.py: don't hardcode the upstream version as 1.0 when SRC_URI is ↵Alexander Kanavin2015-09-281-4/+5
| | | | | | | | | | | | | empty or absent Instead, simply return the version of the recipe, so that the upstream version checker will declare that they match. (From OE-Core rev: 10c948a67546dd4ed2ac00b5210ef4b3eeca9401) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool / lib/oe/recipeutils: ensure we can parse without bbappendsPaul Eggleton2015-09-231-0/+2
| | | | | | | | | | | These functions ostensibly allowed parsing a recipe without bbappends but this clearly hadn't been tested because a variable was unassigned in both of them in that case. (From OE-Core rev: d2bb9f08303bb120e811c03af2f5339e8f262cfa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: properly split unexpanded variable valuesPaul Eggleton2015-09-231-2/+59
| | | | | | | | | | | | | | | | | | | | Variables such as SRC_URI which are space-separated may also contain Python expressions (${@...}) which themselves contain spaces that shouldn't be split when splitting the value into items. In order to ensure this we need to use a custom splitting function instead of just string.split(). This issue could be seen when doing "devtool modify sudo", adding a commit to the resulting source repository then "devtool update-recipe" - the Python expression in SRC_URI was being unnecessarily broken onto multiple lines. Fixes [YOCTO #8046]. (From OE-Core rev: bbec2ee98a08270c681189a6ba26beb1034d3e2f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: avoid parsing in get_var_files()Paul Eggleton2015-08-191-2/+1
| | | | | | | | | | | | | Let's have the caller do this and then the function is a bit more flexible (e.g. we can choose to parse with bbappends or not); fix up calls to this function appropriately (of which there are only two, both within devtool). (From OE-Core rev: 6ba969f1ac5a1a0e277a21287fc5ae1622a6b14e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils.py: allow all characters in regexes used to parse version stringsAlexander Kanavin2015-08-101-2/+2
| | | | | | | | | | Previously only numeric characters were matches and anything else was discarded, so 4.0-rc3, 2005e, 1.0.2a and similar versions got truncated. (From OE-Core rev: ab609c471d85be3248b789c8ab2813957cd97e29) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pvAníbal Limón2015-07-231-0/+6
| | | | | | | | | | Some recipes uses v or r prefixes in versions that makes wrong comparisions over recipes like lz4 r123 > 128. (From OE-Core rev: f7d250c97f40a737df9020180852d2ee87ca06b3) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/recipeutils.py: get_recipe_upstream_info update to get revisionAníbal Limón2015-07-231-13/+15
| | | | | | | | | | | | Bitbake fetcher latest_versionstring now returns a tuple with (version, revision) that helps SCM's like git to build current upstream version. [YOCTO #7605] (From OE-Core rev: 7ede979950fd265026c74526d8448627fd0a8c08) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exitsAníbal Limón2015-07-231-3/+10
| | | | | | | | | | Don't use pfx and sfx when not exist because cause formatting errors like 2.9HASH instead of 2.9+gitAUTOINC+HASH. (From OE-Core rev: 382833cc7e7603241838e18e429f69da0c2ee4ac) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: fix replace_dir_vars to return the correct variablesPaul Eggleton2015-07-161-1/+2
| | | | | | | | | | | | | | | If we sort by length of name here we get the variables we are interested in first. I've tested this with all of the variables we care about (the ones at the top of bitbake.conf) and it returns the right results. This fixes the failures we've been seeing in the oe-selftest test_recipetool_appendfile_* tests. (From OE-Core rev: 95c54512c9fcdbaa419891e46fd99102722ba3d8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URIAníbal Limón2015-07-121-1/+10
| | | | | | | | | | Recipes that don't have SRC_URI means that don't use upstream sources so returns 1.0. (From OE-Core rev: 92f2481cf88e7b626cfe604134c9d020d06bd32c) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: Ensure order of data store doesn't influence the resultRichard Purdie2015-07-121-1/+1
| | | | | | | | | | | The order of the keys from the data store is not prescribed. If target_datadir comes before datadir the selftests fail since the 'wrong' variable is used for substitutions. This highlights an issue with the replace_dir_vars() function. Fix this. (From OE-Core rev: d47c496aa058f5b18d03a68bcd79e5c8607de34f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe.recipeutils: fix line.split error in bbappend_recipeChristopher Larson2015-06-271-1/+1
| | | | | | | | Cc: Paul Eggleton <paul.eggleton@linux.intel.com> (From OE-Core rev: 8d18c2e71b0fcb047831a67d93f4b489aff1b77d) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils: Improve get_recipe_pv_without_srcpv functionAníbal Limón2015-06-081-10/+2
| | | | | | | | | | Use pv instead of rd this make the function more generic and avoid copy recipe data. (From OE-Core rev: c1c3c9a4fbaf01a905f79b0970f98ccb221a3935) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils: Add get_recipe_upstream_version and get_recipe_pv_without_srcpv ↵Aníbal Limón2015-06-031-0/+96
| | | | | | | | | | | | | | | | | functions The get_recipe_upstream_version functions tries to get the current version of recipe in upstream it uses bb.fetch2 latest_versionstring method also latest_revision when is SCM. The get_recipe_pv_without_srcpv discards the SRCPV in SCM's recipe like git it returns a tuple with the version, prefix and suffix of a PV. (From OE-Core rev: d1683b5bb584e2b09bda76bf8523b12636d91d73) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: add appendfile subcommandPaul Eggleton2015-05-201-1/+327
| | | | | | | | | | | | | | | | | | | | | | 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>
* lib/oe/recipeutils: add a parse_recipe_simple() functionPaul Eggleton2015-05-161-3/+26
| | | | | | | | | | | | Add a function that simply parses a recipe by name and optionally the bbappends that apply to it. (Note that if you're using tinfoil you need to have initialised it with config_only=False so that it can map the recipe name to a recipe file.) (From OE-Core rev: a8f221f6c6c0562a5ed06438231c2906e542fb7b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: handle . in recipe namePaul Eggleton2015-04-271-2/+2
| | | | | | | | | | | | Names such as glib-2.0 are valid (and used) recipe names, so we need to support them. Fixes [YOCTO #7643]. (From OE-Core rev: b9fd8d4d4dfae72de2e81e9b14de072e12cecdcf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: include bbappends in recipe parsingMarkus Lehtonen2015-04-271-3/+3
| | | | | | | | | | | In order to get correct metadata, SRCREV for example. Fixes [YOCTO #7648]. (From OE-Core rev: 8b1794559dd7fd956716179d628e61cffdce1686) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: minor improvements to patch_recipe()Paul Eggleton2015-02-231-2/+2
| | | | | | | | | | * Ensure it knows where to put SRCREV and S * Handle prepend/append and functions in general (From OE-Core rev: a770c3764efa857a8b1f0ce4b398277cd483a6af) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe: add recipeutils modulePaul Eggleton2014-12-211-0/+279
Add a module to help provide utility functions for dealing with recipes. This would typically be used by external tools. Substantial portions of this module were borrowed from the OE Layer index code; other functions originally contributed by Markus Lehtonen <markus.lehtonen@intel.com>. (From OE-Core rev: fd970c3b42b39601f379300d83354d42d5a536ba) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>