summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: BBHandler: use with instead of open/close2.3_M1Ross Burton2016-12-161-11/+11
| | | | | | | | | | This is more pythonic and can handle unclosed file warnings better than the previous code structure. (Bitbake rev: 50633012a64a3b5f0662145e29ff426374fb7683) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/command: Drop expanded_dataRichard Purdie2016-12-163-21/+19
| | | | | | | | | | | | | | | Some of our metadata assumes that BuildStarted and BuildCompleted events see the same data store. This is the case for buildTarget but not for buildFile and recent changes mean this is now a problem. The update_data() call is now an empty operation and there is no difference between the expanded_data and data so we can simply remove the expanded_data and its references and use data everywhere. This has been inteded for a while but the above issue makes this more pressing to finally clean up. (Bitbake rev: e3694e738e98f26f413ada6860ca7d829d3662f0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: remove True option to getVar calls (take 2)Joshua Lock2016-12-163-3/+3
| | | | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (a follow on patch to fix up a few recent introductions) (Bitbake rev: f9961fd5beb31d5ab9656a5be59f7ab3effef2f0) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: Always use datastore's PATH for host_gcc_versionRoss Burton2016-12-161-4/+8
| | | | | | | | | | | BUILD_CC may reference something like ccache and expect this to come from ccache-native, we at least have some selftests which assume this. Modify the code to use PATH when runnig BUILD_CC to ensure the tests continue to work as expected. (From OE-Core rev: f3e753372baac43d0921186340cf260df056de20) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: qemux86: use weak assignment for WKS_FILEMaciej Borzecki2016-12-161-1/+1
| | | | | | | | | | | | | | | A follow-up of a fix introduced in 1b32c6ed025745cb06b7c28ca0fe9e416ce7abfa (selftest: wic: fix test_qemu). Wic test_qemu fails on qemux86 due to a direct assignment of WKS_FILE in machine configuration. Using default assignment allows WKS_FILE to be overwritten in test setup. (From OE-Core rev: 9afaeadb37b2b2fab935755ab570cf4b1f3195f4) 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>
* scripts: remove True option to getVarFlag callsJoshua Lock2016-12-162-4/+4
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 3e4806063fe11092b2307f113a6c0b0f04104091) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-1624-71/+71
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: remove True option to getVar callsJoshua Lock2016-12-1622-106/+106
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-16261-2306/+2306
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* valgrind: make ld-XXX.so strlen intercept optionalJackie Huang2016-12-162-0/+46
| | | | | | | | | | | | | | Hack: Depending on how glibc was compiled (e.g. optimised for size or built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found in ld-XXX.so. Therefore although we should still try to intercept it, don't make it mandatory to do so. (From OE-Core rev: 84ec50e587e7464b260b1b189659b93b6dab0ef6) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory-diff: report directory renamesEd Bartosh2016-12-161-3/+31
| | | | | | | | | | | | | The script detects directory renaming if two different directories with the same set of files are added and removed. [YOCTO #10691] (From OE-Core rev: 944db779a9f45cbeeebc976c00da37a517eea237) 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>
* uninative: rebuild uninative for gcc 4.8 and 4.9Ed Bartosh2016-12-163-3/+18
| | | | | | | | | | | | | | | | | | | Some c++ libraries fail to build if uninative is built with gcc 5.x and host gcc version is either 4.8 or 4.9. The issue should be solved by making separate uninative sstate directory structure sstate-cache/universal-<gcc version> for host gcc versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc is either 4.8 or 4.9 and it doesn't match gcc version used to build uninative. [YOCTO #10441] (From OE-Core rev: d36f41e5658bbbb6080ee833027879c119edf3e0) 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>
* systemd: disable 'libdir' QA checkMark Asselstine2016-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building systemd with multilib support enabled in your build you will get the following QA warnings (if the 'libdir' QA check is enabled.) WARNING: systemd-1_232-r0 do_package_qa: QA Issue: systemd-dbg: found \ library in wrong location: /lib/systemd/.debug/libsystemd-shared-232.so systemd: found library in wrong location: /lib/systemd/libsystemd-shared.so systemd: found library in wrong location: /lib/systemd/libsystemd-shared-232.so [libdir] Since systemd 231 upstream has included an 'internal' library which they explicitly place in the application specific /lib/systemd directory. You can see some of the discussion about this placement here https://github.com/systemd/systemd/issues/3810 This placement is being picked up by the QA checker since when multilibs are enabled it expects all libraries to be in lib32 or lib64. Since the systemd and systemd-dbg packages don't contain any other libraries we can respect the upstream placement and skip this QA check for these packages. Unfortunately the QA mechanism doesn't allow us to specify individual files so this approach is the best we can do. (From OE-Core rev: 422077ff91c4147f08108fe8510b238730f2367c) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libxml2: Fix more NULL pointer derefsAndrej Valek2016-12-162-0/+47
| | | | | | | | | | | | | The NULL pointer dereferencing could produced some security problems. This is a preventive security fix. (From OE-Core rev: 8f3008114d5000a0865f50833db7c3a3f9808601) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libxml2: fix CVE-2016-4658 Disallow namespace nodes in XPointer points and ↵Andrej Valek2016-12-162-0/+270
| | | | | | | | | | | | | | | ranges Namespace nodes must be copied to avoid use-after-free errors. But they don't necessarily have a physical representation in a document, so simply disallow them in XPointer ranges. (From OE-Core rev: 00e928bd1c2aed9caeaf9e411743805d2139a023) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libxml2: Necessary changes before fixing CVE-2016-5131Andrej Valek2016-12-162-0/+68
| | | | | | | | | | | | | | xpath: - Check for errors after evaluating first operand. - Add sanity check for empty stack. - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes (From OE-Core rev: 96ef568f75dded56a2123b63dcc8b443f796afe0) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* postinst: Add a test case to verify postinst scripts behaviorJose Perez Carranza2016-12-162-0/+63
| | | | | | | | | | | | Add test case that verify behavior of postinst scripts at roofts time and when is delayed to the first boot directly on the target. (From OE-Core rev: 82b171f3b37e6733997fc1e7685b7cac5a3476e7) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: Test needed to verify postinst orderFrancisco Pedraza2016-12-162-0/+176
| | | | | | | | | | | | | | | | | | It verifies the following: 1. Compile a minimal image. 2. The compiled image will add the layer with the recipe postinst, previously created at: "meta-selftest/recipes-test" 3. Run QEMU. 4. Validate the task execution order. [YOCTO #5319] (From OE-Core rev: a8ff789a3bfedcbc4358db7907a45270d8b1b76a) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Allow to use qemu from host.Mariano Lopez2016-12-161-0/+15
| | | | | | | | | | | | | | | This will add support to use qemu from the running host, with this is possible to put qemu-native in ASSUME_PROVIDED variable. By default it will try to get qemu from the build sysroot, and only if it fails will try to use the host's qemu. (From OE-Core rev: fe7fd2cd3a9c4fb5b31bd3cab81c96a3b81cb540) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: fix getty device removalLeonardo Sandoval2016-12-161-1/+1
| | | | | | | | | | | | | | | | getty devices were not being removed in some cases because device name was not at the end of the line, for example a ttyS1 device: S1:12345:respawn:/bin/start_getty 115200 ttyS1 vt102 Removing this limitation allows sed to remove any line containing the device. (From OE-Core rev: 2e0b36981c1f91ed0d3d457c370df10a099407af) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sqlite: build position-independent codeRoss Burton2016-12-161-0/+2
| | | | | | | | | | pseudo links against this and uses PIC, so some toolchain combinations will refuse to link against sqlite unless it is also PIC. (From OE-Core rev: 6a58e12d19c539deac9e90679a68438497a42fa4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* busybox: allow libiproute to handle table ids larger than 255Lukasz Nowak2016-12-162-0/+135
| | | | | | | | | | | These changes are required for compatibility with ConnMan, which by default uses table ids greater than 255. (From OE-Core rev: e9114bdd8a83b88f59526780910c49e3092fdd57) Signed-off-by: Lukasz Nowak <lnowak@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: move lib/oe tests to oe-selftestRoss Burton2016-12-166-16/+4
| | | | | | | | | | | | | These tests don't get ran often (as demonstrated by the fact that some were not ported to Python 3), so move them to oeqa/selftest so they get executed frequently and can be extended easily. [ YOCTO #7376 ] (From OE-Core rev: 2001979ad41e6fdd5a37b0f90a96708f39c9df07) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libsdl2: fix build on wayland(-dev)less hostsAndreas Müller2016-12-163-3/+37
| | | | | | | | | | | * add sysroot prefix to wayland core protocols * do not use pkg-config to find wayland-scanner (From OE-Core rev: a8e7c5b415b99973c39a7ddd57cae45695fb0119) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libsdl2: add wayland-protocols and -native to to depends of ↵Andreas Müller2016-12-161-1/+1
| | | | | | | | | | PACKAGECONFIG[wayland] (From OE-Core rev: e49f139b4d5cfbf8b0391f4c434070ad30f37b10) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libsdl2: add EXTRA_OECONF[vardepsexclude] = "MACHINE"Andreas Müller2016-12-161-0/+1
| | | | | | | | | | | | fixes Martin's MACHINE checksum test [1] [1] http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129464.html (From OE-Core rev: dcfbfb9b1fc2b5d54e3c04375cb8fc87df849f1f) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: Use PACKAGE_INSTALL instead of IMAGE_INSTALLJackie Huang2016-12-161-1/+1
| | | | | | | | | | | | | | | | | The initramfs image recipes changed to use PACKAGE_INSTALL so they will not be affected by IMAGE_INSTALL, and will cause error when inherit extrausers: | ERROR: core-image-minimal-initramfs-1.0-r0 do_rootfs: core-image-minimal-initramfs: usermod command did not succeed. So use PACKAGE_INSTALL as well in extrausers.bbclass to fix it. (From OE-Core rev: fa541362e2d2cc0494a86a413b7b52dfe3eee908) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: buildoptions: skip read-only-image test depending on distroLeonardo Sandoval2016-12-161-0/+3
| | | | | | | | | | | Poky-tiny cannot build core-image-sato, so skip test (read-only-image) in this case. (From OE-Core rev: bcee8c614f28b38054f5d8c1c5251b3702cf113c) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: bblayers: remove linux kernel checks for show-recipes checkLeonardo Sandoval2016-12-161-5/+1
| | | | | | | | | | | | Preferred kernel recipes depends on the distro, so remove the kernel checks to avoid failures on non-poky distros and make the test distro agnostic. (From OE-Core rev: ae92b72990b3ac804791b501d08126491fdddb7c) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: bbtests: use minimal image so all distros can execute itLeonardo Sandoval2016-12-161-2/+2
| | | | | | | | | | | poky-tiny distro cannot build full-cmdline image, so use an image (core-image-minimal) that can be built in all distros. (From OE-Core rev: b293dd4200bbb3705c88af6113be7f43fbd0ed72) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: base: new object member to store the DISTRO valueLeonardo Sandoval2016-12-162-5/+6
| | | | | | | | | | | | Instead of quering it multiple times, query once and use it on test method skip checks. Also, rename current distro sstate object member to a more meaninful name. (From OE-Core rev: bde9d99575a63ad2d7fd5974ce6ce19aad9a8984) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/commands.py: Fix get_bb_vars() when called without argumentsMariano Lopez2016-12-141-1/+2
| | | | | | | | | | Commit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. (From OE-Core rev: 91f856426c7523e1ebdf6d6f93f5fa7e509d6e49) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add basic tinfoil testsPaul Eggleton2016-12-141-0/+146
| | | | | | | | | | | Add some tests to verify that the new tinfoil API is operating correctly. (From OE-Core rev: 16afda66b861ba028c1152dcdcab2b7ebfbff965) 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-selftest: devtool: improve test_devtool_modify slightlyPaul Eggleton2016-12-141-3/+12
| | | | | | | | | | | | * Check that man .in file actually gets modified, since sed -i doesn't fail if it it doesn't * Use a variable for man file path (From OE-Core rev: 9ad36e945fa5b03726f78ba99e823eade8daa710) 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: prevent BBHandledException from showing tracebackPaul Eggleton2016-12-141-4/+7
| | | | | | | | | | | | If we don't catch this then attempting to run devtool in non-memres mode when bitbake is already running will produce a traceback instead of just an error message. (From OE-Core rev: e01b75dff599ffa2b66e6608b28bbb3564365eee) 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: disable basehash mismatch errorsPaul Eggleton2016-12-141-0/+1
| | | | | | | | | | | | | Using the setVariable commands here followed by buildFile will result in "basehash mismatch" errors, and that's expected since we are deviating *at runtime* from what was previously seen by changing these variable values. Set BB_HASH_IGNORE_MISMATCH to turn off the errors. (From OE-Core rev: b0169796f294bbec0397b7eae86454a46b68cdc5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: drop parse_recipe_simple()Paul Eggleton2016-12-141-22/+0
| | | | | | | | | | | | This was intended to be used with tinfoil, but tinfoil now has its own parse_recipe() method to do this which works properly in the memres case. (From OE-Core rev: cdfc6173cb06ca374b7d927442a0fdde8373ba48) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: fix extraction of source to work in memres modePaul Eggleton2016-12-142-69/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extracting the source for a recipe (as used by devtool's extract, modify and upgrade subcommands) requires us to run do_fetch, do_unpack, do_patch and any tasks that the recipe has inserted inbetween, and do so with a modified datastore primarily so that we can redirect WORKDIR and STAMPS_DIR in order to have the files written out to a place of our choosing and avoid stamping the tasks as having executed in a real build context respectively. However, this all gets much more difficult when in memres mode since we can't call internal functions such as bb.build.exec_func() directly - instead we need to execute the tasks on the server. To do this we use the buildFile command which already exists for the purpose of supporting bitbake -b, and setVariable commands to set up the appropriate datastore. (I did look at passing the modified datastore to the buildFile command instead of using setVar() on the main datastore, however its use of databuilder makes that very difficult, and we'd also need a different method of getting the changes in the datastore over to the worker as well.) (From OE-Core rev: eb63b5339014fc72ba4829714e0a96a98e135ee2) 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: add OE lib pathPaul Eggleton2016-12-141-0/+1
| | | | | | | | | | | The autotools code imports oe.package; we weren't experiencing a problem with this probably due to OE itself adding that path previously. (From OE-Core rev: a61d7bf8447b2d2c65eb34315c86086ff35c8bc9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/patch: move several functions to oe.patchPaul Eggleton2016-12-143-108/+116
| | | | | | | | | | | | Move patch_path(), src_patches() and should_apply() to oe.patch, making them easier to call from elsewhere (particularly across the UI/server boundary). (From OE-Core rev: 2724511e18810cc8082c1b028e3b7c8a8b5def56) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/patch: move in logic to commit for additional tasksPaul Eggleton2016-12-142-36/+70
| | | | | | | | | | | | | | | If PATCHTOOL is "git", and PATCH_COMMIT_FUNCTIONS is set to "1", for additional tasks between do_unpack and do_patch, make a git commit. This logic was previously implemented in devtool itself, but it makes more sense for it to be implemented in the patch class since that's where the rest of the logic is for this (or in lib/oe/patch.py). It also makes it possible for this to work with tinfoil2. (From OE-Core rev: f24f59ea1d8bc335ea8576f6a346d0935f4a3548) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: fix license file checksumming when source not under TMPDIRPaul Eggleton2016-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | With the changes to the code for extracting source for a recipe, we are properly executing the tasks for a recipe, which means their stamps (and therefore signatures) are important. When running devtool extract on the lsof recipe I noticed that do_fetch and do_unpack were executing a second time when we called for do_patch, and this turned out to be because LIC_FILES_CHKSUM in that recipe contains an entry which is an absolute path (has ${S} at the start). Normally this wouldn't be an issue since S is under TMPDIR and thus the existing code would ignore it, however devtool's extraction code extracts to a temporary directory which is not under TMPDIR; the result was the path to this file was not being ignored and the second time around when the license file had been extracted it was incorporated into the signature. We don't want this, so explicitly exclude S as well as B and WORKDIR for good measure. (From OE-Core rev: 1c99d74a862f25e23ea6465fab7ddc9ce74d6974) 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 / recipetool: use tinfoil parsing APIPaul Eggleton2016-12-147-53/+16
| | | | | | | | | | | | | Use Tinfoil.parse_recipe_file() and Tinfoil.parse_recipe() instead of the recipeutils equivalents, and replace any local duplicate implementations. This not only tidies up the code but also allows these calls to work in memres mode. (From OE-Core rev: f13b56266ee96dfab65a3a7db50e8051aa9f071a) 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-selftest: use tinfoil.parse_recipe()Paul Eggleton2016-12-141-3/+1
| | | | | | | | | | | Use tinfoil.parse_recipe() in order to allow oe-selftest to be used in memres mode. (From OE-Core rev: 499ee9006271112f22cfe08fa5ba5c21be95380b) 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-selftest: make tinfoil quiet when using to start QEMUPaul Eggleton2016-12-141-1/+1
| | | | | | | | | | | We don't need to see the parsing/cache loading message in the oe-selftest output, so use the newly added quiet option to disable it. (From OE-Core rev: c023bc55ff000d1de891d1a8e2a163e94bf63de6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils: use cooker function instead of bb.providersPaul Eggleton2016-12-141-11/+2
| | | | | | | | | | | | | We now have a function in cooker itself that can do this lookup; additionally, the rewritten tinfoil's cooker adapter has its own implementation that can work remotely, so if we use it then this function can work in that scenario as well. (From OE-Core rev: 0a6a4be99c1e4ef3c0da53d63f18ad579545d6a8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: package: don't try to initialise tinfoil twicePaul Eggleton2016-12-141-3/+1
| | | | | | | | | | | | | | | setup_tinfoil() already calls prepare(), we don't need to call it again ourselves and doing so with tinfoil2 results in "ERROR: Only one copy of bitbake should be run against a build directory". Calling prepare() twice should probably still be allowed, so that ought to be fixed separately, but in the mean time this code is still wrong so fix it here. (From OE-Core rev: 38b8a7d4aff096ea0a62f2ddf3fe2de1df591bf5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: suppress log_check mechanism for warnings/errors logged ↵Paul Eggleton2016-12-142-14/+25
| | | | | | | | | | | | | | | | | | | | | | through BitBake If you printed a warning through bb.warn() / bbwarn or an error through bb.error() / bberror, this was also being picked up by our log_check mechanism that was designed to pick up warnings and errors printed by other programs used during do_rootfs. This meant you saw not only the warning or error itself, you saw it a second time through log_check, which is a bit ugly. Use the just-added BB_TASK_LOGGER to access the logger and add a handler that we can use to find out if any warning or error we find in the logs is one we should ignore as it has already been printed. Fixes [YOCTO #8223]. (From OE-Core rev: fb37304d27857df3c53c0867e81fbc8899b48089) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs: fix log_check warnings being printed twice with RPM packagingPaul Eggleton2016-12-141-2/+0
| | | | | | | | | | | | | We were calling _log_check() in the RPM-specific rootfs class as well as in the base class; this is unnecessary and resulted in any errors/warnings generated during the actual package installation time triggering two warnings instead of one. Drop the call from RpmRootfs._create() to fix this. (From OE-Core rev: 541c56d755ba0354297673e857628026ad9e4df2) 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-pkgdata-util: Make read-value handle override variablesOla x Nilsson2016-12-142-8/+10
| | | | | | | | | | | | | | | Some variables in pkgdata files have a package-name override. When the bare variable can not be found, try with the override-variant. PKGSIZE is one such variable, and already had special code to handle this. Test included. (From OE-Core rev: 6df99cda894033cba68bc6ab91e47f67e0d788a5) 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>