summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* devtool: build_image: Fix recipe filterOla x Nilsson2016-08-251-1/+1
| | | | | | | | | | The missing split() causes dev and dbg packages to match. (From OE-Core rev: bf83e0f0a3d52958c4380599f1afc4b8e058afd7) Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Use the wildcard flag in update_recipe_patchOla x Nilsson2016-08-251-0/+1
| | | | | | | | | | | The --wilcard-version flag was only used in the srcrev variant of the update-recipe command. (From OE-Core rev: d3057cba0b01484712fcee3c52373c143608a436) Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/recipetool/meta: Adapt to bitbake API changes for ↵Richard Purdie2016-08-185-7/+5
| | | | | | | | | | | | | | 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>
* yocto-bsp/yocto-kernel: update to work with the latest kern-toolsBruce Ashfield2016-08-188-12/+11
| | | | | | | | | | | | | | | | With some recent changes in the kern tools, we can drop some changes in the yocto-bsp and yocto-kernel tools that ensured proper patching and BSP inheritance. In particular, we no longer need to signify the start of patching, and we must instruct the tools that we only want configuration fragments via inheritance .. no patches (since they are already applied). (From meta-yocto rev: 34ed5eebd0b5baab98b6b2d7b3f06ca40932b37d) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix greedy regex that broke support for github tarballsPaul Eggleton2016-08-011-1/+1
| | | | | | | | | | | | | | The regex here needs to be anchored to the end or it'll match longer URLs, which was exactly what I was trying to avoid. This regression was introduced in OE-Core revision 7998dc3597657229507e5c140fceef1e485ac402. Fixes [YOCTO #10023]. (From OE-Core rev: 9291c5d3c257d5ada7605dfe46ababda08f6d3c1) 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>
* recipetool: record unknown license filesPaul Eggleton2016-07-261-0/+10
| | | | | | | | | | | | | Add a comment to the recipe listing license files that were found but not able to be identified, so that the user can find and examine them by hand fairly easily. Fixes [YOCTO #9882]. (From OE-Core rev: 4b7d1bf8172533e9ac91a49ade152a05e2ee4146) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rawcopy: make source filenames uniqueEd Bartosh2016-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | Rawcopy plugin copies source files to build folder before using them to assemble result image. After assembling the image wic renames source files to <image>.p<partition number>. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist. Added <line number> suffix to the files when copying them to the build dir. This should make filename unique even if the same source file is used for multiple partitions. [YOCTO #9826] (From OE-Core rev: 43a809bfe99024083b4ab4eb9895b084c9c4fa80) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add finish subcommandPaul Eggleton2016-07-201-1/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+10
| | | | | | | | | | | | 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>
* devtool: update-recipe: refactor to allow calling separatelyPaul Eggleton2016-07-201-27/+29
| | | | | | | | | | | This will be called by "devtool finish" to allow it to update the recipe or create the bbappend depending on the destination. (From OE-Core rev: 5067cdc73483b53d46d9bf584723e41957c7ec54) 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: reset: refactor to allow calling separatelyPaul Eggleton2016-07-201-17/+23
| | | | | | | | | | | This will be called by "devtool finish" to allow it to reset the recipe at the end. (From OE-Core rev: b8d398516556eaf97679e28ad58448f570984b52) 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: don't copy local files that haven't changedPaul Eggleton2016-07-201-1/+5
| | | | | | | | | | | | | If there are files in the oe-local-files directory which are identical to the original version, then we shouldn't be copying them to the destination layer. This is particularly important when using the -a option to create a bbappend. (From OE-Core rev: 9230bfcc839eb35630949f0a8ed058ca1fa944b1) 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: find and use existing files directoriesPaul Eggleton2016-07-201-4/+14
| | | | | | | | | | | | | | | | devtool update-recipe was defaulting to the ${BPN} named directory when adding patches next to a recipe, but that meant if you already had files in a ${BP} named directory (i.e. name and version) or "files" then you'd end up with two directories next to the recipe, which is usually not what you want. To avoid this, look through FILESPATH and take the first one that's the same level or one level down from the recipe and already exists, if any. (From OE-Core rev: c7a8190cf8bdf86ba850b6780b8e951e90232c06) 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>
* wic: mountpoint is an optional argumentMaciej Borzecki2016-07-201-1/+1
| | | | | | | | | | | | | | According to wic documentation partition mount point is an optional argument. Skipping mount point also makes sense in certain configurations when one needs to specify a partition that is not mounted by the running system, such as a recovery or a mirror partition (in dual rootfs setups). (From OE-Core rev: 5e063a4c6bb0e0623a4d25bb2bf6eecd9ad6b9f1) Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: clone gummiboot wks for systemd-bootJianxun Zhang2016-07-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wks is just a copy of gummiboot wks with bootloader changed to systemd-boot. A very basic boot test on a X86 target is done with a direct-boot image generated by: wic create mksystemd-bootdisk -e core-image-minimal Because we plan to replace gummiboot with systemd-boot at any time in the future, we summarize history (as much as I can) of the current gummiboot wks before it's gone: ----------------------------------------------------------------- commit 7d4bb40905fab38fb3db1d0e17afbc803622f00c Author: Ed Bartosh <ed.bartosh@linux.intel.com> Date: Wed Sep 2 13:58:02 2015 +0300 wic: get rid of scripts/lib/image Moved content of scripts/lib/image/ to scripts/lib/wic as one directory with the same name as a tool is self-explanatory and less confusing than two. (From OE-Core rev: 5dc02d572794298b3362378cea3d7da654456c44) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> commit 77561e719181d58289687373eebadce764f838a7 Author: Ed Bartosh <ed.bartosh@linux.intel.com> Date: Wed Sep 2 13:58:01 2015 +0300 wic: use ext4 in canned .wks files Latest kernel doesn't have ext3 compiled in. Wic images produced from canned .wks can't boot because of that. Switching to ext4 fixes this issue. (From OE-Core rev: d281a65a81f369fc8d75023b8f911ce4106969c1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> commit 072657ce98414afdd6f68941847e21fc5ce496c7 Author: Tom Zanussi <tom.zanussi@linux.intel.com> Date: Mon Aug 11 20:35:41 2014 -0500 wic: Add mkgummidisk kickstart file This is the same as mkefidisk but uses gummiboot instead of grub-efi. (From OE-Core rev: 5979409ebfab0bb07b3c2b2fcf14a722c441f07b) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ----------------------------------------------------------------- (From OE-Core rev: 546cd8352b8adce074831ec31cfa3bb2bf2f0084) Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add systemd-boot option in EFI boot image pluginJianxun Zhang2016-07-201-3/+5
| | | | | | | | | | | | | | | | | | | | | The new systemd-boot enabled in OE is the old gummiboot merged into systemd project. Our intention is to replace gummiboot with systemd-boot in OE once every feature based on gummiboot is supported with systemd-boot. Before we can purge gummiboot, we temporarily keep both of the two bootloaders supported. Patch doesn't do replacement for every "gummi" occurrence. We think cleaning can be done in background after we disable people to use gummiboot, so we just keep change small and safe this time. (From OE-Core rev: daa5f8b886408eb6a17898b18ac97d5a0d76d2cc) Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support specifying a file as the local sourcePaul Eggleton2016-07-122-5/+14
| | | | | | | | | | | | | | | | It is currently possible to specify a file (e.g. a tarball) on the local disk as the source, but you have to know to put file:// in front of it. There's really no need to force users to jump through that hoop if they really want to do this so check if the specified source is a file and prefix it with file:// if that's the case. Also ensure the same works for "devtool add" at the same time. (From OE-Core rev: 71350003790c38e84b0e525a71a2fe5d24e3d083) 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>
* recipetool: create: fix handling of github URLsPaul Eggleton2016-07-121-1/+1
| | | | | | | | | | | | | | | For a while now, Github hasn't been advertising a specific repository URL since cloning the web URL with git works. Armed with this knowledge and fully expecting people to just paste the github URL, we need to handle this situation specially. If it looks like a github URL to the root of a repository then treat it as a git repository instead of a normal https URL to be fetched by the wget fetcher. (From OE-Core rev: 7998dc3597657229507e5c140fceef1e485ac402) 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: return specific exit code for incompatible recipesPaul Eggleton2016-07-122-9/+12
| | | | | | | | | | | | | Certain recipes cannot be used with devtool extract / modify / upgrade - usually because they don't provide any source. Return a specific exit code (4) so that scripts such as scripts/contrib/devtool-stress.py know the difference between this and a genuine failure. (From OE-Core rev: ffd295fed4ab81fc0bd00bb145ef4d72c49584bf) 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: reset: allow reset to work if the recipe file has been deletedPaul Eggleton2016-07-121-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) 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 --initial-rev optionPaul Eggleton2016-07-121-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) 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>
* recipetool: create: drop unused convert_pkginfo() functionPaul Eggleton2016-07-081-29/+0
| | | | | | | | | | Code cleanup, no functional changes - this code was never used. (From OE-Core rev: 397b76c7f26e38e761b94b1f7987aafd55048e10) 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>
* recipetool: create: avoid decoding errors with Python 3Paul Eggleton2016-07-085-14/+14
| | | | | | | | | | | | | | | | We're opening source files with the default encoding (utf-8) but we can't necessarily be sure that they are UTF-8 clean - for example, recipetool create ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz prior to this patch resulted in a UnicodeDecodeError. Use the "surrogateescape" mode to avoid this. Fixes [YOCTO #9822]. (From OE-Core rev: 50fcd9d1b9a20d49bc873467a82a071f2f2f8b5a) 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>
* scripts/lib/bsp/help.py: Changed help of yocto-bsp to match latest syntaxHumberto Ibarra2016-07-071-8/+8
| | | | | | | | | | | | With the changes to migrate from optparse to argparse there was a syntax change that needs an update in the help. This is basically just the change of 'properties' and 'property' from positional arguments to options. This patch makes the required changes. [YOCTO #8321] (From meta-yocto rev: b171379b5ca54d55ea763421794a651e71bbda91) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Refactor script to use argparse instead of optparseHumberto Ibarra2016-07-071-23/+7
| | | | | | | | | | | Optparse is deprecated and should be avoided. The arparse library is better suited and has more tools to handling the parsing of arguments. This patch makes necessary changes to migrate to the better library and uses arparse subcommand feature to improve organization of this script. [YOCTO #8321] (From meta-yocto rev: 3f45993b96d4d960da0efe8672dc323c9db091a2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Add error message for wrong input fileHumberto Ibarra2016-07-071-2/+4
| | | | | | | | | | | Format of properties file is expected to be a simple json detailing properties, if this format fails an exception is thrown. This patch adds a graceful error message to the case when the properties file has a wrong format. [YOCTO #9750] (From meta-yocto rev: 7e543aa19d0d4b2112e6316783fb31b76df3493e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/help.py: Fixed pager for yocto-bsp helpHumberto Ibarra2016-07-071-1/+1
| | | | | | | | | | | Python3 requires strings to be encoded as bytes before sending them through a subprocess pipe. The help.py file is not considering this and fails when issuing paged help commands. This patch adds this encoding to solve the problem. [YOCTO #9868] (From meta-yocto rev: 35b487a47f0cbb99fdee2ec9cc8b56b814c8860e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: recognize less common makefile namesNathan Lynch2016-07-011-1/+1
| | | | | | | | | | | | GNU make looks for "makefile" and "GNUmakefile" in addition to "Makefile", so add these other names to the heuristic for detecting a make-based project. (From OE-Core rev: 204d19b02265e5b2241888e4c92c0a730f3d3472) Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: allow specifying multiple recipesPaul Eggleton2016-06-151-4/+5
| | | | | | | | | | | Allow specifying more than one recipe on the devtool reset command line. Also tweak the help text slightly. (From OE-Core rev: ad92ed8e4f7f48a3d212962531d596b36f6b284f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Added missing parentheses to string formattingHumberto Ibarra2016-06-121-1/+1
| | | | | | | | | | | | | | Commit ab75075e7941c8c2ec429c180976702cd311c978 broke the string formatting for multiple arguments. Since parentheses were removed the formatting considers only first argument instead of all of them. Fixed parentheses on the formatting. [YOCTO #9723] (From meta-yocto rev: d6d641d5b4bb0c8b9acd5cd1341a4a3214bff086) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/kernel.py: python3: use explicit relative importsHumberto Ibarra2016-06-121-1/+1
| | | | | | | | | | | | | Have to convert implicit relative imports to explicit imports since implicit relative imports are not supported on python3. [YOCTO #9723] (From meta-yocto rev: 89cecc603d229768428f3cb68d21235dee80efda) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Rename raw_input commands to inputHumberto Ibarra2016-06-121-2/+2
| | | | | | | | | | | | | | According to https://docs.python.org/3/whatsnew/3.0.html python3 renamed 'raw_input' to 'input'. Making the appropiate changes for this. [YOCTO #9723] (From meta-yocto rev: 76efeeeac7fb30b44ee7057b3b3d1fd84329dae1) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Added missing keyword to fix syntax errorHumberto Ibarra2016-06-071-1/+1
| | | | | | | | | | | | Commit af9f6b88fcc5d7fddff01595f9bcf2aba548720 introduced a syntax error in engine.py by removing keyword "in". This patch adds it back. [Yocto #9719] (From meta-yocto rev: 49f02f3344617f8b077edf61e8f5ead05e8405eb) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: decode subprocess outputEd Bartosh2016-06-031-5/+5
| | | | | | | | | | | stdeout and stderr content returned by subprocess API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. (From meta-yocto rev: 1de9d0b4ad289c56907d082748cdc0111988cb4f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* engine: python3: replace iteritems() -> items()Ed Bartosh2016-06-031-3/+3
| | | | | | | | | Used items() as iteritems() doesn't exist in python 3. (From meta-yocto rev: 0fd2e739cd14c6a02b6f4610176a0ad29b2ecc0e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: replace exec statement with builtinEd Bartosh2016-06-031-1/+1
| | | | | | | | | | Used exec() builtin instead of 'exec' statement as this statement doesn't exist in python 3. (From meta-yocto rev: ceb6c6fac212c5e1e76bf58b793dc2b9420b4a66) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: use explicit relative importsEd Bartosh2016-06-032-3/+2
| | | | | | | | | | | | Implicit relative imports within packages are not supported in python 3. They have to be converted to explicit imports. Used 'from .module import' syntax for relative imports. (From meta-yocto rev: 8eb2befc544e29fd87ac1fc75886cc6d7f40ad90) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* engine.py: python3: rename sys.maxint to sys.maxsizeEd Bartosh2016-06-031-3/+3
| | | | | | | | | | Renamed sys.maxint -> sys.maxsize as sys.maxint doesn't exist in python 3. (From meta-yocto rev: b165be8c7f6d44c03bc76dd25c2b9e4cb54bb65a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: use new metaclass syntaxEd Bartosh2016-06-031-4/+2
| | | | | | | | | | | Used metaclass=<metaclass> syntax instead old __metaclass__ = <metaclass> as only new one is supported in python 3. (From meta-yocto rev: 70ba79981d904b4b67440c0b5755b5449cddb025) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: rename raw_input to inputEd Bartosh2016-06-032-12/+12
| | | | | | | | | | Renamed raw_input to input as raw_input does not exist in python 3. (From meta-yocto rev: c9df9f2699885f2ba5b031c8761aefbf3c796067) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live, image-vm, wic: Remove fs size workaroundJussi Kukkonen2016-06-034-26/+0
| | | | | | | | | | | | Since mtools has been patched to live with filesystems with sizes not divisible by sectors-per-track, we no longer need to try to set the size based on our guess of the sectors-per-track dosfstools is going to use. (From OE-Core rev: 334e32af88b310ff1ed950d127a6dedeb460f8d0) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: change python to python3 in shebangEd Bartosh2016-06-031-1/+1
| | | | | | | (From OE-Core rev: 4b544ff388497cac82b0585f237900595523e1cb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: convert iterables to listsEd Bartosh2016-06-034-7/+7
| | | | | | | | | | | Converted return value of items() keys() and values() to lists when dictionary is modified in the loop and when the result is added to the list. (From OE-Core rev: 874a269eb1d70060c2f3b3f8b70800e2aea789f4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix urlparse imports for python3Ed Bartosh2016-06-021-3/+3
| | | | | | | | | | Used urllib.parse instead of urlparse to make code working in python 3. (From OE-Core rev: 0a064f2216895db0181ee033a785328e704ddc0b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix encoding errors for python3Ed Bartosh2016-06-024-5/+6
| | | | | | | | | | | | | | Moved call of decode('utf-8') as close as possible to call of subprocess API to avoid calling it in a lot of other places. Decoded binary data to utf-8 where appropriate to fix devtool and recipetool tests in python 3 environment. (From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Replace basestring -> str for python3Ed Bartosh2016-06-024-6/+6
| | | | | | | | | | Python 3 doesn't have basestring type as all string are unicode strings. (From OE-Core rev: e8cfab060f4ff3c4c16387871354d407910e87aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix deprecated dict methods for python3Ed Bartosh2016-06-028-35/+35
| | | | | | | | | | 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>
* wic: encode help textEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | Encoded help text before sending it to pager.communicate as it expects binary. [YOCTO #9412] (From OE-Core rev: 23c27d9d936efaa17da00525f1d2e2f98c53abc7) 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-6/+6
| | | | | | | | | 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>