summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>