summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
Commit message (Collapse)AuthorAgeFilesLines
* devtool: reset: allow reset to work if the recipe file has been deletedPaul Eggleton2016-11-081-1/+1
| | | | | | | | | | | | | | | | We were attempting to open the recipe file unconditionally here - we need to account for the possibility that the recipe file has been deleted or moved away by the user. (From OE-Core rev: 47822a2aff56fd338c16b5ad756feda9f395a8a1) (From OE-Core rev: 6fb1bb71b92d47eda48d24d3c0440b5219ac1fcd) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: fix --initial-rev optionPaul Eggleton2016-11-081-8/+5
| | | | | | | | | | | | | | | | | | In OE-Core revision 7baf57ad896112cf2258b3e2c2a1f8b756fb39bc I changed the default update-recipe behaviour to only update patches for commits that were changed; unfortunately I failed to handle the --initial-rev option which was broken after that point. Rework how the initial revision is passed in so that it now operates correctly. (From OE-Core rev: b2ca2523cc9e51a4759b4420b07b0b67b3f5ac43) (From OE-Core rev: d62aa298b80af78bc89f6e64736ce7383c3fa2de) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: call shutdown on tinfoil when donePaul Eggleton2016-03-311-0/+2
| | | | | | | | | | | | | Strictly speaking we ought to explicitly shut down a tinfoil instance when we're done with it. This doesn't affect modify's operation but is important if you want to be able to call into modify() from another plugin (though anyone doing so should be advised that the function is by no means a stable API and is subject to change in future releases). (From OE-Core rev: 626dbadf22b57a22a8f8b9d1957937120f4ba4d5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: create git repository if URL specified as positional argumentPaul Eggleton2016-03-251-1/+1
| | | | | | | | | | | | | | | When we add from a fetched URL we are supposed to turn the resulting source tree into a git repository (if it isn't already one). However, we were using the older deprecated option name here instead of the positional argument, so "devtool add -f <url>" resulted in the repo being created but "devtool add <url>" didn't, which was wrong. Also update the oe-selftest tests to check that this worked. (From OE-Core rev: a7b6b1f8cc1c096724f794ac9dee312b0f771f66) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: delete externalsrc files on npm recipe do_installPaul Eggleton2016-03-251-0/+11
| | | | | | | | | | | | | | The npm class just installs whatever is in ${S}; if you're using externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs by default) plus singletask.lock will end up in the final package, which isn't really right. Introduce a variable so we know the path the files will be installed into within npm.bbclass, and append to do_install within the workspace bbappend to delete the files. (From OE-Core rev: 766845e06db9d7d595e836ea1364c16fa132a413) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: change config symlink name to .config.newMarkus Lehtonen2016-03-201-2/+2
| | | | | | | | | | | | | Otherwise (if the symlink is named .config) kernel build considers source tree as dirty and fails. [YOCTO #9270] (From OE-Core rev: d36699b28c661880957d744420df9e23cdd76957) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support creation of additional files by pluginsPaul Eggleton2016-03-091-1/+5
| | | | | | | | | | | | | | | | Allow plugins to create additional files to go alongside the recipe. The plugins don't know what the output filename is going to be, so they need to put the files in a temporary location and add them to an "extrafiles" dict within extravalues where the destination filename is the key and the temporary path is the value. devtool add was also extended to ensure these files get moved in and preserved upon reset if they've been edited by the user. (From OE-Core rev: 334b9451111b7e3efbb43b3a4eecebcab8ec6f0e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: fix source tree default name when mapping virtualsPaul Eggleton2016-02-281-17/+18
| | | | | | | | | | | | | | If you for example ran devtool modify virtual/libusb0 without specifying a source tree path, the default was <workspace>/sources/virtual/libusb0 which isn't correct - it should be using the mapped name i.e. libusb-compat (in the default OE-Core configuration). Reorder some of the code to ensure that the mapped name is used. (From OE-Core rev: c51736df17da8e6e561dd5b7ce59cb08254da870) 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: add: tweak auto-determining name failure messagePaul Eggleton2016-02-281-1/+1
| | | | | | | | | | As suggested by Khem Raj. (From OE-Core rev: 36cc6b81d0281348a0f241a80ddd427745a6a678) 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: create config fragmentMarkus Lehtonen2016-02-281-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | Create config fragment if the user makes modifications to kernel config. User may change .config e.g. by directly editing it or by running the 'do_menuconfig' bitbake task. Devtool generates one monolithic fragment by simply doing a diff between .config and .config.baseline files in the source directory. If either of these files is missing, the config fragment is not gerenrated or updated. The output is a file, 'devtool-fragment.cfg' that gets added to SRC_URI in the recipe (as well as copied into the 'oe-local-files' directory if that is present in the source tree). ${S}/.config will be a symlink to ${B}/.config. We need to do this as devtool is not able to access ${B} because ${B} is set in a .bbappend in the workspace layer which is not parsed by devtool itself. [YOCTO #8999] (From OE-Core rev: 524da136e5b837a60682516ac08f3092c635e934) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sync: update kernel configMarkus Lehtonen2016-02-281-1/+5
| | | | | | | | | | | Copy kernel config is copied to the source directory at a later phase in _extract_source() so that it gets copied when devtool sync is done, too. (From OE-Core rev: ff895be7a46c4b3b1b791e5387490d90bb34fce2) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: tweak help description for behaviour changePaul Eggleton2016-02-211-2/+2
| | | | | | | | | | I should have adjusted this in OE-Core commit 80a44e52609a89d9ffe816181ae193af491c06ac where the behaviour changed. (From OE-Core rev: 13409a2b899bb74b8060c840b8c7ef8759d099cb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: categorise and order subcommands in help outputPaul Eggleton2016-02-211-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The listing of subcommands in the --help output for devtool was starting to get difficult to follow, with commands appearing in no particular order (due to some being in separate modules and the order of those modules being parsed). Logically grouping the subcommands as well as being able to exercise some control over the order of the subcommands and groups would help, if we do so without losing the dynamic nature of the list (i.e. that it comes from the plugins). Argparse provides no built-in way to handle this and really, really makes it a pain to add, but with some subclassing and hacking it's now possible, and can be extended by any plugin as desired. To put a subcommand into a group, all you need to do is specify a group= parameter in the call to subparsers.add_parser(). you can also specify an order= parameter to make the subcommand sort higher or lower in the list (higher order numbers appear first, so use negative numbers to force items to the end if that's what you want). To add a new group, use subparsers.add_subparser_group(), supplying the name, description and optionally an order number for the group itself (again, higher numbers appear first). (From OE-Core rev: e1b9d31e6ea3c254ecfe940fe795af44761e0e69) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: don't show workspace recipe warning if no updatePaul Eggleton2016-02-211-5/+9
| | | | | | | | | | If we didn't make any changes to the file then there's no point warning the user that we have done. (From OE-Core rev: 391b9ba30d802ac420ddf382588e03e718861c01) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: fix preserving patches/other files next to recipesPaul Eggleton2016-02-211-4/+4
| | | | | | | | | | | | | | | | If files had been created next to the recipe (for example devtool add, edit the source and commit and then devtool update-recipe), running devtool reset failed to preserve those files and gave an error due to trying to rmdir the directory containing them which wasn't empty. Fix the preservation of files in the "attic" directory properly so we catch anything under the directory for the recipe, and replicate the same structure in the attic directory rather than slightly flattening it as we were before. (From OE-Core rev: bbe63eb97ae7f78959f117d6066ef821c4da1c77) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: minor fix for error messagePaul Eggleton2016-02-211-1/+1
| | | | | | | | | | There is no -N/--name option for devtool, that's a recipetool option - with devtool you just specify the name as a positional argument. (From OE-Core rev: d2bc0cba5ca8a7220ffe1ef96acf856fe972ce7c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: fix adding from a local source directoryPaul Eggleton2016-02-111-1/+1
| | | | | | | | | | | | | Fix a regression introduced in in OE-Core revision aedfc5a5db1c4b2b80a36147c9a13b31764d91dd where specifying a local source tree without specifying a name resulted in a traceback. Fixes [YOCTO #9086]. (From OE-Core rev: 67ea9d21f20a371a0ee443b46326018cb1527b62) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: make -x the default behaviourPaul Eggleton2016-02-111-6/+8
| | | | | | | | | | | | | | | It's going to be more common for users not to have the prepared source tree for a recipe already, so the default behaviour ought to be to extract it for them from the recipe. Change the default to extract (effectively making the -x option a no-op) and add a --no-extract/-n option to disable it. Later we can look at trying to be smart and reusing an existing source tree instead of erroring out if it exists; for now this is just the default reversal. (From OE-Core rev: 80a44e52609a89d9ffe816181ae193af491c06ac) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: commit for extra tasks that modify source when extractingPaul Eggleton2016-02-111-13/+35
| | | | | | | | | | | | | | | | When extracting source for a recipe, if there are additional custom tasks run that make changes to the source, create a commit in the generated git branch so they are contained. This is particularly useful for tasks that come before do_patch since otherwise the changes might get incorporated in the first applied patch, but otherwise it helps avoid the tree being dirty at any point. Fixes [YOCTO #7626]. (From OE-Core rev: 997a77d9b20af1778b804778e5d8c8a7424f7582) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/devtool: Add getVarFlag expand argumentRichard Purdie2016-02-061-1/+1
| | | | | | (From OE-Core rev: afa9b1081848cf0dbc40bbaf565bcc2ee19e8f6e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: use the correct datastore for builddirMarkus Lehtonen2016-01-261-1/+1
| | | | | | | | (From OE-Core rev: 6f5bec4570a9237681fcee3922209af2a48f6c07) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: properly handle bb.build.FuncFailed when extracting sourcePaul Eggleton2016-01-261-1/+4
| | | | | | | | | | | | When we run the tasks required to extract the source for a recipe (e.g. within "devtool modify" or "devtool extract") if one of those tasks fails you get a bb.build.FuncFailed exception; handle this properly so you don't see a traceback. (From OE-Core rev: 95d8631b3bdf216001e57f48277535c65a4cc49e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: warn if modified recipe found in attic directoryPaul Eggleton2016-01-261-0/+3
| | | | | | | | | | | | | | | If a recipe generated by "devtool add" has been modified since then when you run "devtool reset", it will be moved into the "attic" subdirectory of the workspace in case those modifications need to be preserved. It seems natural that if those modifications were worth preserving we should warn the user if such a file exists when they run "devtool add" to create the same recipe again, so they can pick up where they left off if they want to. (From OE-Core rev: 0a39b907ff997c3a62c92ab22325c726b612de5b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: move edit-recipe to a separate modulePaul Eggleton2016-01-261-36/+0
| | | | | | | | | | standard.py is getting a bit large; move the "utility" commands to another module. (From OE-Core rev: 5089b93f5b341dc28c343f7afe15efda2081ed36) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool / recipetool: support specifying a subdirectory within the fetched ↵Paul Eggleton2016-01-241-0/+6
| | | | | | | | | | | | | | | source Sometimes you don't want to build an entire project, just a subdirectory of it; add a --src-subdir option to make that easier. (We still look for a single subdirectory in what gets unpacked, e.g. what you might find within a tarball, so whatever you specify with this option is added onto the end of that.) (From OE-Core rev: 59682d78f95732e014f78f13e0a05f843860d9bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: support recipes with BBCLASSEXTENDPaul Eggleton2016-01-111-2/+11
| | | | | | | | | | | If the recipe file itself was created in the workspace, and it uses BBCLASSEXTEND (e.g. through devtool add --also-native), then we need to clean the other variants as well. (From OE-Core rev: e1bf6a30679a83d4dbcf37276204f639541e95f9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: refactor code for getting local recipe filePaul Eggleton2016-01-111-15/+4
| | | | | | | | | | | We're doing this in a couple of places, let's just find the recipe file if it exists within the workspace (which it will if it's been added through "devtool add") when we read in the workspace. (From OE-Core rev: 81cf5580993c99050e3f4d6d891bc67534721487) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: support adding a native variantPaul Eggleton2016-01-111-0/+3
| | | | | | | | | | | | | | | | Sometimes you need to build a variant of a recipe for the build host as well as for the target (i.e. BBCLASSEXTEND = "native"); add a --also-native command line option to "recipetool create" that enables this and plumb it through from an identical option for "devtool add". (We could conceivably do the same for nativesdk, but I felt it might be confusing within the context of the extensible SDK, where nativesdk isn't really relevant to the user.) (From OE-Core rev: f3bea83db173cce921a9a30f04e88b7e3ed98854) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: do clean for multiple recipes at once with -aPaul Eggleton2016-01-111-11/+14
| | | | | | | | | | | | | | We need to run the clean for all recipes that are being reset before we start deleting things from the workspace; if we don't, recipes providing dependencies may be missing when we come to clean a recipe later (since we don't and couldn't practically reset them in dependency order). This also improves performance since we have the startup startup time for the clean just once rather than for every recipe. (From OE-Core rev: c10a2de75a99410eb5338dd6da0e0b0e32bae6f5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sync: tweak help / messagesPaul Eggleton2015-12-281-5/+5
| | | | | | | | | | Much of this was copy/pasted from the extract subcommand code; make it specific to sync. (From OE-Core rev: 08ca966dd48db881d8bfb7d7fa0aba49f1f7cffe) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: print message about leaving source tree behindPaul Eggleton2015-12-281-0/+11
| | | | | | | | | | | | We deliberately leave the source tree alone when resetting in case it contains any work in progress belonging to the user; tell them that we're doing this so they aren't surprised about it still existing later on. (From OE-Core rev: 1c616802ba2cfb37f8403f1dc6cf91ce3bd99ac2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: status: list recipe file within workspace if one existsPaul Eggleton2015-12-281-1/+11
| | | | | | | | | | | If a recipe in the workspace actually exists as a file within the workspace (e.g. after doing "devtool add" or "devtool upgrade") then show the path to the recipe file on the status line for the recipe. (From OE-Core rev: 29833828a90c8433af3b231b50e99cd97edf19ff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: default source tree pathPaul Eggleton2015-12-281-11/+15
| | | | | | | | | | As per the changes to "devtool add", make the source tree path optional and use the default path if none is specified. (From OE-Core rev: 83707d1334fb094fd1877bcfd07a83866601048a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: allow specifying URL as positional argumentPaul Eggleton2015-12-281-15/+37
| | | | | | | | | | | | Having to specify -f is a little bit ugly when a URI is distinctive enough to recognise amongst the other positional parameters, so take it as an optional positional parameter. -f/--fetch is still supported, but deprecated. (From OE-Core rev: aedfc5a5db1c4b2b80a36147c9a13b31764d91dd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: figure out recipe name from recipetoolPaul Eggleton2015-12-281-37/+90
| | | | | | | | | | | | recipetool create now has all the logic in it for auto-detecting the name and version, and using those in the file name - so we can make the name an optional parameter for devtool add and we pick up the file name that recipetool has used after the fact. (From OE-Core rev: 70ab08146e930f1fc55fdf5726a87303e20bd60f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: allow source tree to be omittedPaul Eggleton2015-12-281-4/+26
| | | | | | | | | | | | Assuming we're fetching source remotely (from a URI) we can default the source tree that will be extracted from it to a "sources" directory under the workspace in order to save the user specifying it if they don't have a preferred location. (From OE-Core rev: ffdad964c7271972e4b067e4898bf7c338c25b68) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: use correct method to get bbappend filenamePaul Eggleton2015-12-281-4/+3
| | | | | | | | | | The bbappend already exists at this point, so we know what its path is - there's no need to figure it out from scratch here. (From OE-Core rev: c0754d672966901f22dff1bcd40bbd08d1219c7a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: split out function for naming bbappendPaul Eggleton2015-12-281-13/+5
| | | | | | | | | | We're repeating this in a couple of places, so we might as well have a function to do it. (From OE-Core rev: 67a28109a1ee1383d1b17a8dafa4fe510948238b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: tweak help textPaul Eggleton2015-12-281-2/+2
| | | | | | | | | Add a few clarifying words. (From OE-Core rev: 2103fa9dc7faf2189c8b426b87fb9d421a9983ac) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: edit-recipe: add new subcommandPaul Eggleton2015-12-281-0/+44
| | | | | | | | | | | | | Add an "edit-recipe" subcommand that runs your default editor (as specified by the EDITOR environment variable) on the specified recipe in the workspace. Note that by default the recipe file itself must be in the workspace - i.e. as a result of "devtool add" or "devtool upgrade"; however there is a -a/--any-recipe option to override this. (From OE-Core rev: dbfe8fa2e86c2bb50bef47c389017cdf93543321) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: update SRCTREECOVEREDTASKS for kernelMarkus Lehtonen2015-12-091-1/+2
| | | | | | | | | | | | | | | | | | Add 'do_kernel_configme' and 'do_kernel_configcheck' to SRCTREECOVEREDTASKS of kernel packages. These tasks should not be run because kernel meta in the srctree is not necessarily up-to-date or even present which causes build failures and/or invalid kernel config. Especially so because 'do_patch' which is a dependency of 'do_kernel_configme' is not being run. We now store .config in the srctree and 'do_configure' task is able to run successfully. (From OE-Core rev: 7ce4c18a4ba1ebcb9f46e652a881ace1f21d2292) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: copy kernel config to srctreeMarkus Lehtonen2015-12-091-0/+8
| | | | | | | | | | | | This makes the correct kernel config to be used when building kernel from srctree (extrernalsrc). If no kernel config is present in the builddir 'do_configure' task copies .config from the srctree. (From OE-Core rev: 3b516332e038a587685f6e0c14a7f04990bdd6cc) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: clarify help textPaul Eggleton2015-12-011-16/+12
| | | | | | | | | | | | | * Make some minor clarifications to help text * Drop ArgumentDefaultsHelpFormatter and just put the defaults in the text itself where needed (because otherwise you get defaults shown for store_true options which is somewhat confusing). (From OE-Core rev: a90ffea30c4578fd6acda2c5945b816ad33b13f5) 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: disable creating workspace for extract and search subcommandsPaul Eggleton2015-12-011-1/+1
| | | | | | | | | | | For subcommands that don't actually involve the workspace, don't auto-create the workspace. (From OE-Core rev: 90cba7992bc1d227e242666cd486414bd4a45f7e) 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: fix removing other recipes from workspace on resetPaul Eggleton2015-12-011-1/+1
| | | | | | | | | | | | | | | If you did a "devtool add" followed by "devtool upgrade" and then did a "devtool reset" on the recipe you upgraded, the first recipe would also be deleted from the workspace - this was because we were erroneously adding the entire "recipes" subdirectory and its contents to be tracked for removal on reset. Remove the unnecessary call to os.path.dirname() that caused this. (From OE-Core rev: 65354e066f87df7d3138adceb22d6a05d1685904) 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: include do_patch in SRCTREECOVEREDTASKSTzu-Jung Lee2015-12-011-1/+1
| | | | | | | | | | | | The external source of kernel has been patched during the construction of git repository. Include the do_patch task in the SRCTREECOVEREDTASKS. (From OE-Core rev: 0731c5a9e98f7b7f6e5ada9bbb99acb3f5884516) Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add sync commandTzu-Jung Lee2015-11-251-21/+79
| | | | | | | | | | | | | | The sync command is similar to the extract command, except it fetches the sync'ed and patched branch to an existing git repository. This enables users to keep track the upstream development while maintaining their own local git repository at the same time. (From OE-Core rev: e2fe4c99f1020a20b579832c4feafcd0e9bc2f75) Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.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-6/+18
| | | | | | | | | | | | | | 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>
* devtool: extract: fix error handlingPaul Eggleton2015-10-191-0/+8
| | | | | | | | | | | If recipe parsing fails we need to exit out instead of attempting to use the data object that's set to None, which resulted in a traceback. (From OE-Core rev: a46fb1a06be2df00a0bceb4e60ebdecb55b5974c) 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: avoid updating patches that have not changedPaul Eggleton2015-10-071-3/+26
| | | | | | | | | | | | | | | Use "git cherry" against the original tag that we made when we extracted the source in order to find the revisions that are definitely new. This allows you to modify a commit in the middle of the series and then run devtool update-recipe and not have the subsequent patches unnecessarily modified. Fixes [YOCTO #8388]. (From OE-Core rev: 7baf57ad896112cf2258b3e2c2a1f8b756fb39bc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>