summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* linux-yocto-custom: include a user feature description fileChoong YinThong2017-07-062-0/+2
| | | | | | | | | | | | | | Missing user feature description file when select linux-yocto-custom in script/yocto-bsp and causes failure in script/yocto-kernel feature add. [YOCTO #11585] (From meta-yocto rev: 9939e7eacf8a205fb0b10de8a6cc065a8048b103) Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: make signature check code reusablePatrick Ohly2017-07-062-58/+70
| | | | | | | | | | | | | This moves the main content of test_signature into a helper function. It can be reused by arbitrary tests that need to do a before/after signature comparison. Long-term this might even be useful in oeqa itself. (From OE-Core rev: ecc9a1f9ceec9996aeb2c602846d51277de0b4a5) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: allow README with suffixPatrick Ohly2017-07-061-4/+10
| | | | | | | | | | | | | | | | It may be useful to append a suffix denoting the file format. For example, README.rst is rendered differently when viewed on Github, and also helps editors to switch to a mode more suitable for the format. The tests uses a file pattern to find the README file(s) and treats the one with the shortest name as the main one which must not be empty. (From OE-Core rev: 501b5b7f338396a4a115355b8a78ae5b03f67d9a) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: add test_worldPatrick Ohly2017-07-061-0/+9
| | | | | | | | | | | | | | | | | "test_signatures" ignores wold build breakage for the sake of reporting differences also when a world build is broken. Therefore we need a dedicated test that a world build at least theoretically can proceed without obvious parse time problems (dependencies, parse errors, dangling .bbappends, etc.). This is similar to the BSP test_machine_world. The difference is that test_world doesn't change the MACHINE. (From OE-Core rev: 1ca35d8571a92c7f8f80c909ca38666da82eb929) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: apply test_signatures to all layersPatrick Ohly2017-07-062-3/+5
| | | | | | | | | | | | | | | | | | | | | | | Software layers were previously allowed to change signatures, but that's not desired for those layers either. The rule that a layer which is "Yocto Compatible 2.0" must not change signatures unless explicitly requested holds for all kinds of layers. However, as this is something that software layers might not be able to do right away, testing for signature changes in software layers can be disabled. It's on by default, as that was Richard's recommendation. Whether that should change needs further discussion as part of finalizing "Yocto Compatible 2.0". As it might still change, the tool now has both a with/without parameter so that users of the tool can choose the desired behavior without being affected by future changes to the default. (From OE-Core rev: e7fe215f50a1b75771f33fffdda529a95c026d3f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: tolerate broken world builds during signature diffPatrick Ohly2017-07-062-2/+7
| | | | | | | | | | | | The "test_signatures" test ignored a broken world build when getting signatures, but the code which then tried to analyze a difference found by the test didn't, which prevented printing the difference. (From OE-Core rev: e8416554dfc9d4196543279a4845f6c0671f3e5c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-compat-layer.py: avoid adding layers more than oncePatrick Ohly2017-07-061-2/+15
| | | | | | | | | | | | | | add_layer_dependencies() might get called more than once, or one of the layer dependencies might already be present. The function should not add layers again because doing so can cause warnings like: WARNING: Duplicate inclusion for .../meta-openembedded/meta-oe/conf/distro/include/meta_oe_security_flags.inc in .../meta-openembedded/meta-oe/conf/layer.conf (From OE-Core rev: 4afb7c3c505a4d21906f07f88c966b794a968cbc) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove extra double-quote on documentation stringJean-Francois Dagenais2017-06-231-1/+1
| | | | | | | | (From OE-Core rev: e34fd016ed6634b1375b78f3dfe60afcc58e5bab) Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/runner.py: move runtool API to misc.pyEd Bartosh2017-06-232-55/+36
| | | | | | | | | | | | | | Moved remaining API to misc.py. Removed runner.py. Now misc.py is ready to be moved to the scripts/lib/wic and utils directory can be removed. (From OE-Core rev: 327e340a29d330f24117e24d0649fa156017208f) 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>
* wic: fix restoring of original fstabEd Bartosh2017-06-231-4/+5
| | | | | | | | | | | | | | | | | | | Wic updates fstab if mount points are specified in .wks. After partition images are created the original fstab is restored. However, if exception is raised when partition image being prepared wic doesn't restore original fstab. This can cause duplication of added lines in fstab when 'wic create' runs next time. Wrapping call of 'prepare' method and restoring original fstab even if exception occurs should fix this. [YOCTO #11633] (From OE-Core rev: 29f7735030d383f9614bdb148b52a47c79f05eea) 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>
* wic: code cleanupEd Bartosh2017-06-235-11/+5
| | | | | | | | | | | Split long lines. Removed unused imports. (From OE-Core rev: 49b704864c7db49e41a0b6bbdb8a2840e7fa232b) 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>
* wic: flatten directory structureEd Bartosh2017-06-2312-13/+12
| | | | | | | | | | | Moved misc.py from wic/utils/ to wic/ Removed wic/utils directory (From OE-Core rev: df906f3caa0721756f5ed48fa657e62e05ae2aa3) 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>
* linux-yocto: remove user-specific description/config files from machine ↵Leonardo Sandoval2017-06-148-16/+0
| | | | | | | | | | | | | | | | description Remove user-specific descrition files and config fragments from main machine description file otherwise double patch/config inclusion may happen. These files/fragments are already included on the SRC_URI (see poky commit 2db8f3), so no need to reference these inside machine.scc files. [YOCTO #11586] (From meta-yocto rev: 86ab7ab6688f250bb5777371d2cbc28c770847d4) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement removing directoriesEd Bartosh2017-06-141-4/+18
| | | | | | | | | | | | Added support for removing directories using mdeltree utility to Disk.del method [YOCTO #11283] (From OE-Core rev: a5fc61d8f290d370f4bc51d4e2a67a5580edb1b1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement removing filesEd Bartosh2017-06-141-1/+15
| | | | | | | | | | | | | Added implementation of Disk.del method and wic_r function that removes files from the vfat partition using mdel utility. [YOCTO #11283] (From OE-Core rev: 4abf2d2643c58322d96d63d5f3ffaf52d62c6792) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic rm' commandEd Bartosh2017-06-141-0/+7
| | | | | | | | | | | | Added empty 'wic rm' command that does nothing. The functionality will be added by the next commits. [YOCTO #11283] (From OE-Core rev: f8e42c13609c482359fbdb225fb16a45101ae9ae) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add help and usage content for 'wic rm'Ed Bartosh2017-06-141-1/+58
| | | | | | | | | | | Added wic_rm_help and wic_rm_usage variables to help.py. These variables contain help content that will be used in 'wic rm help' and 'wic rm --help' output. (From OE-Core rev: b6894538b2a426762a07c0e7b014a04f4e00266d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fully implement 'wic cp'Ed Bartosh2017-06-141-1/+10
| | | | | | | | | | | | | Added implementation of Disk.copy method and wic_cp function that copies files/directories to the vfat partition of the partitioned image. [YOCTO #11283] (From OE-Core rev: 416e4599960987f0ce31b3f16f3c6af0bf633a26) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add Disk._put_part_image methodEd Bartosh2017-06-141-0/+5
| | | | | | | | | | | This method copies partition image into the wic image. It will be used in 'wic cp' and 'wic rm' subcommands to copy changed partition back into wic image. (From OE-Core rev: 7a7e6635e2e2ddfff2bca58c860634b7a199b0df) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* filemap: calculate dst size correctlyEd Bartosh2017-06-141-1/+5
| | | | | | | | | | | Fixed calculation of the dst file size using skip, seek and length parameters. Current code does it incorrectly which causes sparse_copy API to create unnecessary big output files. (From OE-Core rev: e6d709a6382e4b913612f597e66ad07b0e351d5f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* filemap: check if dest is written for every blockEd Bartosh2017-06-141-0/+7
| | | | | | | | | | | | | | If lenght parameter is provided to sparse_copy call it's mandatory to check if the output file is fully written after reading unmapped block from input file. If it's not done then sparse_copy can write more data than specified length. (From OE-Core rev: 289b1767182982dfb6912e64481150697ba93e4d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* filemap: change signature of sparse_copy functionEd Bartosh2017-06-142-4/+13
| | | | | | | | | | | | | | Renamed parameter offset->skip to match names of dd parameters. Changed affected sparse_copy calls. Added explanation of the parameters to docstring. (From OE-Core rev: 08e2f4e59816c5757686255b267b08cbc46fbd95) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add mcopy propertyEd Bartosh2017-06-141-0/+5
| | | | | | | | | Added property that points to the mcopy executable. (From OE-Core rev: 05badb6427442388b9bea04c8b184a2ce92362ec) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add Disk._prop helperEd Bartosh2017-06-141-5/+10
| | | | | | | | | | Added generic helper to use in property methods to access commands in a lazy manner. (From OE-Core rev: 4c1ded3ddbd04ad1640620ec1348831692a93dbe) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic cp' commandEd Bartosh2017-06-141-0/+7
| | | | | | | | | | | | Added empty 'wic cp' command that does nothing. The functionality will be added by the next commits. [YOCTO #11283] (From OE-Core rev: f0dcf39d52185430422cb0c94c7fe99c12764acd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add help and usage content for 'wic cp'Ed Bartosh2017-06-141-0/+62
| | | | | | | | | | | | | | Added wic_cp_help and wic_cp_usage variables to help.py. These variables contain help content that will be used in 'wic cp help' and 'wic cp --help' output. [YOCTO #11283] (From OE-Core rev: f3f0dadada1e297f2b54fa320bb817da7f755c1f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* engine: implement listing wic imagesEd Bartosh2017-06-141-2/+82
| | | | | | | | | | | | | Implemented 'wic ls' functionality: - list image partitions - list directory content of vfat partitions [YOCTO #11283] (From OE-Core rev: 61667fabd5746caf773f73b3aeb2a04db13cba38) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic ls' commandEd Bartosh2017-06-141-0/+4
| | | | | | | | | | Added empty 'wic ls' command that does nothing. The functionality will be added by the next commits. (From OE-Core rev: ba4613469cc2c3d3433be2e2f520f4fff6b3b333) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add help and usage content for 'wic ls'Ed Bartosh2017-06-141-0/+65
| | | | | | | | | | | | Added wic_ls_help and wic_ls_usage variables to help.py. These variables contain help content that will be used in 'wic ls help' and 'wic ls --help' output. (From OE-Core rev: 5152f993777550e5e8a420db4d1f3c4370cd1d33) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bootimg-pcbios: make boot image file uniqueEd Bartosh2017-06-141-1/+1
| | | | | | | | | | | | | | Plugin code uses boot.img file name for an image file. If there are two partitions that use bootimg-pcbios wic breaks with an error "file already exists: boot.img" Made image file name unique by adding wks like number to it to fix the issue. (From OE-Core rev: eec6e946cce36cba304851fa4a1c1d7bfd7b0bed) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* filemap: add parameter 'length' to sparse_copyEd Bartosh2017-06-141-3/+12
| | | | | | | | | | | Added parameter 'length' to specify amount of data to write into destination file. This is useful when only part of source file should be written into destination file. (From OE-Core rev: cc44e2eb3b5027a3531e6349937a23d73313b3c6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* filemap: fix skip logicEd Bartosh2017-06-141-4/+7
| | | | | | | | | | | | | Fixed bug in processing 'skip' parameter: don't read input file if end of bmap block is less than skip Simplified logic of positioning to the start of data inside a partially skipped bmap block. (From OE-Core rev: c19f78a0713c8ac9d28b78f86c6d7b96157788f0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-yocto: include missing description files and conf fragmentsLeonardo Sandoval2017-06-1349-49/+175
| | | | | | | | | | | Include missing description files and configuration fragments into the SRC_URI. [YOCTO #10918] (From meta-yocto rev: e57f92996e71d4085ebaa41e802bea3cc1466cd7) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard: Fix lock in _prep_extract_operationAníbal Limón2017-06-121-0/+1
| | | | | | | | | | | | | | | | | | | If for any reason the parse_recipe fail in extract command the process gets locked because Cooker is expecting the finish event by tinfoil. For example: $ devtool extract remake /tmp/remake ERROR: remake is unavailable: remake was skipped: PREFERRED_PROVIDER_virtual/make set to make, not remake (From OE-Core rev: 2c0062b59178fa668b26487b6d2f1e81a0d868e0) 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>
* yocto-bsp: Fix QEMUARM based bsps to not offer SMP supportAlejandro Hernandez2017-06-097-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The SMP kernel config presents issues on qemuarm because: CONFIG_SMP=y Dependencies Missing: - CPU_V6K or CPU_V7: These are selected by setting: CONFIG_ARCH_MULTI_V7=y or CONFIG_ARCH_MULTI_V6=y But our QEMU + ARM BSPs are based on armv4/v5 hence they are incompatible with CONFIG_SMP. This patch fixes the script, and avoids offering SMP to the user when the created BSP is based on QEMU + ARM. [YOCTO #11426] (From meta-yocto rev: d63aa4acd20b2aa022701289e9ab7be7f551b0b2) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove obsolete reference to msger logger.Kristian Amlie2017-06-061-2/+5
| | | | | | | | | | This was overlooked when msger was removed in 28014087b8091. (From OE-Core rev: b561292c4e7b5578172066f82b6518b5bda53f42) Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib: removes bsp 4.8 kernel bbappends as the version is no longer ↵Daniela Plascencia2017-06-0514-541/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | supported These files should be removed as version 4.8 is no longer supported (6751dce4cf and 1632f6623c) and errors may be produced when executing some commands. For instance, "yocto-bsp list <karch> --property <property_name>" expects the SRC_URI of the 4.8 kernel recipe, which doesn't exist anymore, throwing the following exception: $ yocto-bsp list arm --property existing_kbranch Getting branches from remote repo None... Traceback (most recent call last): ... SyntaxError: function specified for 'gen' property returned nothing : input type: "choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" [YOCTO #9867] (From meta-yocto rev: fb0ed1cdeac9e716d1eaa5b11c8262a209bf148e) Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCHEd Bartosh2017-06-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | isoimage-isohybrid plugin fails with this error when trying to find initrd image: initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0] IndexError: list index out of range as it uses TRANSLATED_TARGET_ARCH value as part of the image. This approach stopped to work due to changes in oe core code. initrd file name is made using MACHINE variable. wic can't get value of this variable as it's not included into bitbake -e output. Used basename of deploy dir as MACHINE value to fix the breakage. (From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05) (From OE-Core rev: e26fa1c34c33ffdc678f8073dade0126aff08b40) 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: deploy-target: Let script continue even if rm failsDaniel Lublin2017-06-031-1/+1
| | | | | | | | | | | | | | The remote script is run with `set -e`, so doing rm without -f on a $file that is already gone will exit the whole script, failing any redeployment. Assume a use case where packages sometimes produces certain test binaries stored on volatile media (tmpfs), and where the system is occasionally rebooted. (From OE-Core rev: db54c9a22a9b66c673df8e836de5e47fc9edda0b) Signed-off-by: Daniel Lublin <daniel@lublin.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Compare abspath of both B and SOla x Nilsson2017-06-031-1/+1
| | | | | | | | | | | | | | | | Either both or none of the paths must be passed through os.path.abspath or things like 'A//B', 'A/./B/', and 'A/B/' in S will cause unintentional mismatches even when B = "${S}". Using os.path.abspath for both seems more likely to be correct as that will also handle the case where ${B} != ${S} but the abspaths are equal. (From OE-Core rev: 061f2aab40fecbfe0dcb928baa95d6b3a6b45eed) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: deploy-target: Don't use find -execDaniel Lublin2017-06-031-1/+5
| | | | | | | | | | | find may be provided by busybox, which might be compiled without support for -exec. (From OE-Core rev: 404e8e3661469175e1ea087ebfaf3a7867bf4df2) Signed-off-by: Daniel Lublin <daniel@lublin.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard.py: Enable perf to be buildableSaul Wold2017-05-251-1/+4
| | | | | | | | | | | | | | | | | | | Perf is a tool build from the kernel source, which is normally available in /work-shared/..., but when devtool is used to modify the kernel source code, perf is not buildable since it gets an error about being unable to add a depends to a non-exisit task do_patch. This patch removes do_patch from the SRCTREECOVEREDTASKS and creates an empty do_patch task to enable the VarFlags code to have someplace to attach depends information to. [YOCT #11120] (From OE-Core rev: 86c793595e560e7bc52e3cd2a2752746e6adcb76) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: fix fetch_uri() to work with RSSPaul Eggleton2017-05-251-24/+41
| | | | | | | | | | | | | | | | | | | | | | | | Since recipe-specific sysroots were implemented, devtool add and devtool upgrade operations that fetch from a URL that requires native sysroot dependencies will fail to work as there is no recipe-specific sysroot set up for them during fetching. An example was any URL pointing to a tarball compressed with xz, e.g. devtool upgrade on gnutls. The most expedient way to fix this is to set up a dummy recipe-specific sysroot to use for the fetch/unpack operations. We do this in the same manner as bitbake -b does, so we're just taking all of the sysroot components available and creating a sysroot from those rather than ensuring the correct dependencies are there - this means that we're still going to have problems if e.g. xz-native hasn't been built yet, but that issue will be trickier to solve and is tracked separately. Fixes [YOCTO #11474]. (From OE-Core rev: 559151e783759af78b5cdd76cdbb9ce325a391e6) 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: extract name of package from a repositoryPaul Eggleton2017-05-231-3/+8
| | | | | | | | | | | | | For git repositories in the absence of any other indicator, it's not an unreasonable assumption that the name of the repository is the name of the software package it contains, so use that as PN if we don't have anything else. (From OE-Core rev: ef73fa70f0955912b0da140922465a3c817424e9) 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: skip values extracted from spec files containing macrosPaul Eggleton2017-05-231-0/+4
| | | | | | | | | | | | | | | | | | If a value we extract from a spec file contains an unexpanded macro (e.g. %{macroname}) then we should discard it since we're not seeing the actual value and we don't have an easy way of expanding it at the moment. This fixes for example getting %{name} as the recipe name when running the following: recipetool create https://github.com/gavincarr/mod_auth_tkt.git (From OE-Core rev: eee56a19cda051da6267f808cd3a04a4c644acb3) 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: Add missing text to usage and help stringsAndreas J. Reichel2017-05-231-1/+1
| | | | | | | | | | | | | | Add missing parameters -c to and remove non-existent parameter -i from usage string for 'wic create'. (From OE-Core rev: da937e0e2478152968d5fd5eec7dd8cc2b922afb) Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com> 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>
* wic: Use argparse instead of optparseAndreas J. Reichel2017-05-232-12/+22
| | | | | | | | | | | | | | | | | | | * optparse is deprecated and will not be developed further (see: https://docs.python.org/2/library/optparse.html) * argparse supports subcommands, which simplifies definition of arguments and options * reimplement help mechanism through sub-subcommands [YOCTO #9636] (From OE-Core rev: 4fe9635c72a6ee1becc47d832ab54724176ee811) Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com> 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>
* wic: Fix typo in help screen.Kristian Amlie2017-04-291-1/+1
| | | | | | | | | | This was overlooked when f6a064d969f4149b was merged. (From OE-Core rev: 29a209822488ab687abdb1ceffdd9c7af5b3db68) Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: drop erroneous bb.event.TaskStartedPaul Eggleton2017-04-141-1/+0
| | | | | | | | | | | This is a non-existent event - we already have the actual bb.build.TaskSucceeded further down in the list hence why it wasn't noticed earlier. (From OE-Core rev: 4e059a5ceb6f44401154e89e37f56de1d664a7cb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: fix handling of failed tasksPaul Eggleton2017-04-141-0/+3
| | | | | | | | | | | | | If a task such as do_fetch fails when we're extracting source for a recipe (within devtool modify / upgrade / extract / sync) then we should naturally stop processing instead of blundering on; in order to do that we need to be listening for the TaskFailed event. Thanks to Richard Purdie for noticing and fixing this. (From OE-Core rev: 9174b845bf6a6be7753bf6b921959b1f3f2dcbc0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>