summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* rootfs.py: change the notice about deferring scripts to first boot from ↵Alexander Kanavin2018-01-301-1/+1
| | | | | | | | | | | | warning to a note Now that the first boot deferral needs to be requested explicitly, it's not really something to be concerned about. (From OE-Core rev: 19f3f4c60060ff5ed3c1c9871e18fcd4d128c5a3) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to ↵Alexander Kanavin2018-01-301-0/+3
| | | | | | | | | | | | | | | | | | | | first boot 'exit 1' is not optimal for two reasons: 1) Code is hard to read; it is not obvious that it means 'defer what follows to first boot'. 2) Worse, this hides actual errors in the scriptlets; there is no difference between scriptlet failing because it's intended to be run on target and scriptlet failing because there's a bug or a regression somewhere. The new, supported way is to place the code that has to run on target into pkg_postinst_ontarget(), or, if a more fine-tuned control is required, call 'postinst-intercepts defer_to_first_boot' from pkg_postinst() to explicitly request deferral to first boot. (From OE-Core rev: d12cf56e9ff2a4f13dfbef9290ea5647b52b3f6d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing ↵Alexander Kanavin2018-01-301-0/+4
| | | | | | | | | | | | | postinst_intercept hooks That hook is empty, and doesn't need to be executed; it merely indicates that packages that have used it are requesting to defer their postinst scripts to first boot unconditionally. (From OE-Core rev: 939f7f1a06cd2db05aeb5e75a66322314e10aa6d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate ↵Alexander Kanavin2018-01-301-16/+19
| | | | | | | | | function (From OE-Core rev: 4612291411ad788df88d5fc6dde98ff53fd91002) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: add gobject-introspection testRoss Burton2018-01-291-0/+15
| | | | | | | | (From OE-Core rev: 497a95b576e19e39e20ac280d0db24f51b7c9679) (From OE-Core rev: 7fe336e34bbdc16a28f95ce6ec043943f8033002) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: disable f2fs from test_image_features by defaultSaul Wold2018-01-231-1/+1
| | | | | | | | | | | Since the primary f2fs utilities are provided by the meta-openembedded meta-filesystems layer, we disable the testing of that functionality here. (From OE-Core rev: f691ed2572e54fa2af04c1569746c36ce04463ee) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory_analysis: colourise more outputRoss Burton2018-01-231-2/+2
| | | | | | | (From OE-Core rev: e0f2c84e5ee6c4e5a56e485010647ca698d010bf) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-01-222-4/+11
| | | | | | | | | | | | repos don't conflict The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. (From OE-Core rev: 5e5569c962c9ebc898eeb5044214e95117b190e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory-diff: add support for colourising the outputRoss Burton2018-01-181-5/+25
| | | | | | | | | | | | | | Colour value removes in red and additions in green, making it easier to scan the output for relevant changes. This adds a --colour option to specify whether colouring should be on, off, or detected. The default is detected, and depends on whether stdout is a TTY (same behaviour as git). (From OE-Core rev: 4208f1546c92f069e432d1865269ce539db8cea7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/cases/devtool.py: fix workspace layer checkingRobert Yang2018-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: $ oe-selftest -r devtool.DevtoolTests.test_create_workspace [snip] 2017-12-20 18:28:59,404 - oe-selftest - INFO - Traceback (most recent call last): File "/workspace2/lyang1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f return func(*args, **kwargs) File "/workspace2/lyang1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 177, in test_create_workspace self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf') AssertionError: False is not true : This test cannot be run with a workspace layer in bblayers.conf [snip] $ bitbake-layers show-layers NOTE: Starting bitbake server... layer path priority ========================================================================== meta /workspace2/lyang1/poky/meta 5 meta-poky /workspace2/lyang1/poky/meta-poky 5 meta-yocto-bsp /workspace2/lyang1/poky/meta-yocto-bsp 5 meta-selftest /workspace2/lyang1/poky/meta-selftest 5 There is no workspace layer, but I'm in /workspace2, this patch can fix the problem. [YOCTO #12442] (From OE-Core rev: 695b234ea4f034d428f8cffacceabc2b8f00bc74) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gnupg: use native version for signing, rather than one provided by hostAlexander Kanavin2018-01-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Using host gpg has been problematic, and particularly this removes the need to serialize package creation, as long as --auto-expand-secmem is passed to gpg-agent, and gnupg >= 2.2.4 is in use (https://dev.gnupg.org/T3530). Sadly, gpg-agent itself is single-threaded, so in the longer run we might want to seek alternatives: https://lwn.net/Articles/742542/ (a smaller issue is that rpm itself runs the gpg fronted in a serial fashion, which slows down the build in cases of recipes with very large amount of packages, e.g. glibc-locale) Note that sstate signing and verification continues to use host gpg, as depending on native gpg would create circular dependencies. [YOCTO #12022] (From OE-Core rev: 08fef6198122fe79d4c1213f9a64b862162ed6cd) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manifest.py: sort package listMichael Blättler2018-01-111-2/+2
| | | | | | | | | | | The entries of the created manifest file are always in a different order. To ensure a deterministic build output the entries are ordered alphabetically. (From OE-Core rev: f3b753943d0c886a2a158247d2ea02867f3c0dae) Signed-off-by: Michael Blättler <michael.blaettler@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk/sdk: Update sdk dummy providersRichard Purdie2018-01-112-19/+0
| | | | | | | | | | | | | | | | | | When we migrated rpm v5 -> v4, we lost the ability to drop "per file" dependencies from the rpm backend for things like "/bin/bash" and "/usr/bin/env" which meant the sdks were becomming 'bloated'. This restores the functionality using a dummy package, similarly to the way the buildtools perl issue was addressed. It also removes the non-functional old code so as not to confuse people in future. I ran into this problem trying to filter dependencies to only rpms a build directly depends upon and it turns out we have some determinism issues in this area so this is something key to fix. (From OE-Core rev: 9d490dc01dcedb216129b22cbe17a6c99efc4f5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: remove obsolete MULTILIB_ARCHSRobert Yang2018-01-061-1/+1
| | | | | | | | | | | | | | | It had been removed since 2011: commit b774bf44ef004276da12a83ebd69715c00b596ac Author: Lianhao Lu <lianhao.lu@intel.com> Date: Tue Aug 16 16:26:49 2011 +0800 package(_ipk).bbclass: opkg using ALL_MULTILIB_PACKAGE_ARCHS (From OE-Core rev: e03cfb5a04e359c0bacb002dc80f3348301445d3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: print running dnf commandRobert Yang2018-01-061-0/+1
| | | | | | | | | | This can make debug easier, for example, makes it easy to run the command mannually. (From OE-Core rev: 220b912237da78d257c5310bd07db89489afede1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/copy_buildsystem.py: make sure layer existsRobert Yang2018-01-061-1/+1
| | | | | | | | | | | | | | It had a problem when nested layer before, e.g.: layer_a/layer_b/ And when layer_b is handled before layer_a, then layer_a dir existed, so it would be treated as already handled, which was wrong, check conf/layer.conf can fix the problem. (From OE-Core rev: 2eaefa0c3ae589111266c7d6822428ad910415f4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Set AUTOREV to have a vardepvalueRichard Purdie2018-01-061-1/+37
| | | | | | | | | | | | | | | | | | | | | If you have a recipe which does not include SRCPV in PV but does set SRCREV = "${AUTOREV}" and you run do_fetch, then change the repo to a new commit then run do_unpack, do_unpack will fail since the new commit doesn't exist in the repo that was fetched. The problem is the revision chosen is not represented in the do_fetch task hash. It if were, the fetch would rerun first and the commit would be present. It works when PV includes SRCPV since that does contain the chosen commit from the AUTOREV. The solution is to include the SRCPV value into the representation of AUTOREV used for checksum calculation purposes. Add a selftest for this issue. (From OE-Core rev: 7b8ee9285a197784d51e339f1603240f49435846) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/buildcpio: Use our own mirror for sourceRichard Purdie2018-01-061-2/+1
| | | | | | | | | | We see occasional network glitches which break this test. Use our own mirror (which has a .gz instead of .bz2) to avoid the errors, we're not trying to test network connectivity. (From OE-Core rev: 038d7270aef0cccf87d50a117160c58261beb9b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/cases/ptest.py: fail when ptests fail on targetAlexander Kanavin2018-01-051-0/+8
| | | | | | | | | | | That's the whole point isn't it? Previously this testcase succeeded even if some of the underlying on-target tests failed; the only way to find out if anything was wrong was to manually inspect the logs. (From OE-Core rev: 21b27d1e9d54d4aab412facff22cd5d3d77827a8) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES; run ↵Alexander Kanavin2018-01-051-1/+4
| | | | | | | | | | | | | | | | | | | only when ptest-runner is availalble; Previously the test would execute only when all available ptests for packages in the image were installed; some of those tests may be broken, never finish, take a very long time or simply irrelevant to the user who wants to check ptests of only a few specific packages, and does so by listing them explicitly via IMAGE_INSTALL_append or similar. Presence of ptest-runner means there is at least one ptest package installed as they pull it in via a class dependency; ptest-runner is not generally installed otherwise. (From OE-Core rev: e07a2b9c2b08a465baeaaca86461e07817f84a52) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: Make get_multilib_datastore available from lib/oeRichard Purdie2018-01-041-0/+8
| | | | | | | | | Currently we can't access this function from lib/oe as its a class function. Move it to allow such access. (From OE-Core rev: b241a666f2867ffa425f6d43763d7c3c17941dcf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core/loader.py: fix regex to include all available test casesLeonardo Sandoval2018-01-041-1/+1
| | | | | | | | | | | | Some test cases (eSDK.oeSDK*, runtime_test/*) does not match with current regex, fix it accept all. [YOCTO #12385] (From OE-Core rev: 1ecf48fd286a77078451b67879a44f9c9dc7a894) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/patch: add missing importPaul Eggleton2018-01-021-0/+1
| | | | | | | | | | | This module refers to oe.types, so it needs to actually import oe.types. Fixes errors when parsing certain OE-Core recipes within the layer index update script. (From OE-Core rev: 26ff9d2835a24a84c7f2bf9c829a13ed568c9ea0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemu: remove elf image typeSaul Wold2018-01-021-1/+1
| | | | | | | | | | | Since we are depercating the ELF image type, we should not test it here either. (From OE-Core rev: c0c10ae9f7e206ee156a68ddbed73c8820c37824) 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>
* oe-selftest: devtool: switch away from mkelfimagePaul Eggleton2018-01-021-3/+3
| | | | | | | | | | | | mkelfimage is about to be removed, so test_devtool_modify_git needs to use a different recipe. psplash is a reasonable choice given it uses a git repository (and probably will forever), and doesn't have too many dependencies, so change the test to use that recipe instead. (From OE-Core rev: daf583efc87faa058684dfe34df596d088caa8ef) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update to 4.14.0Alexander Kanavin2018-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously oe-core had a development snapshot of rpm, it's better to update to something more stable. Removed patches: 0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch (upstream is using pkg-config) 0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch (functionality has been moved to a plugin, we disable plugins for rpm-native) 0012-Use-conditional-to-access-_docdir-in-macros.in.patch (merged upstream) Changed patches: 0001-Fix-build-with-musl-C-library.patch (one previous musl issue has been resolved upstream; another has been added) Rest of the patches are trivial rebases. Update the signing oe-selftest so that the reference output matches the upstream changes. (From OE-Core rev: b4613b6ce07c295c5d6de6861acf19315acaccb2) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/wic: update OETestID decorator for test_qemuJoshua Lock2017-12-211-1/+1
| | | | | | | | | | Test case ID 1422 is not correct for this issue, the correct test case ID for test_qemu is 1424. (From OE-Core rev: d214b1dc9339c4873156934f5291b9373a11471f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/buildoptions: Add test for fortran compiler buildingRichard Purdie2017-12-211-0/+14
| | | | | | (From OE-Core rev: 84d6be8ceb14b418b059212108c5a71a5950e6c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/archiver: Add test for srpm archiver mode dependenciesRichard Purdie2017-12-211-0/+13
| | | | | | (From OE-Core rev: dc7a6b9a73362de5e87439a852234fb1c59ca004) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-selftest: wic: Add test for --use-uuid / --fsuuidTom Rini2017-12-181-2/+5
| | | | | | | | | | | | | | - Mount a '/media' partition to wic-image-minimal.wks with a known UUID. - In test_qemu, sort our output from checking the output of 'mount' as it may not be stable. Also, do not check the exit code as passing any output to cut ensures a 0 exit code. - Check for a 'UUID=' line in /etc/fstab with out expected output. (From OE-Core rev: 6d9396b26218f3234701944f385d5c36face8121) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* targetcontrol.py: use oe.types.boolean for QEMU_USE_KVMRobert Yang2017-12-181-1/+3
| | | | | | | | | | | | So that both QEMU_USE_KVM = "True" and "1" will work. [YOCTO #12343] (From OE-Core rev: f28890ae2eb8a9cb2da39588e696a4b0c501bdf0) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: fix test for changes in lzo recipePaul Eggleton2017-12-101-6/+10
| | | | | | | | | | | | acinclude.m4 is about to be removed from the lzo recipe which breaks test_devtool_update_recipe_local_files_2. Create a synthetic recipe in meta-selftest with some local files and use that instead. (From OE-Core rev: ed27470fa6a9f3cc1a0eb884474fe7985babde7a) 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>
* utils: qemurunner.py: cleanup grammar and ensure consistencyMark Asselstine2017-12-101-1/+1
| | | | | | | | | | | Minor grammar correction along with making the term 'login banner' consistent throughout to make searching logs easier. (From OE-Core rev: 54e739485faba8d80f5af15407905aaeda4767f4) 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>
* utils: qemurunner.py: Log both 'failed to reach login banner" reasonsMark Asselstine2017-12-101-2/+6
| | | | | | | | | | | | | | The current logging always assumes the boot timeout has expired yet there is a second reason we might have ended up in a position where no login banner was found, that being a socket disconnect. Add logging for the disconnect case and make the timeout expiration conditional on the timeout being exhausted. (From OE-Core rev: 49403368ccf3e469ac111afa259a38cc11e0b688) 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>
* utils: qemurunner.py: Add wall clock to 'timeout' loggingMark Asselstine2017-12-101-6/+14
| | | | | | | | | | | | | | | | | | | When debugging issues when timeouts are involved it is always best to have wall clock times included. This helps give confidence that the timeout is in fact run down at the right rate and that no unexpected events were the true cause of a premature running down of the timeout. Having these times in old logs also helps when debugging issues as we have a historic record as to what is a 'typical' time to complete an action. In addition to adding the wall clock times the time to 'login' is now printed making it consistent with the time to 'qemu pid'. (From OE-Core rev: 4a6364309547d77d1d7a94c48f7c51ceee2b5d1a) 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>
* templates/layer.conf: remove backslash to enable bbappend settingChen Qi2017-12-101-1/+1
| | | | | | | | | | | | Remove the redundant backslash in template layer.conf file, otherwise, the bbappend line setting wouldn't have effect, causing bbappend files in these created layers not having any effect. (From OE-Core rev: 7909b258ac87d4be9bb7aba00d12fd363bd9b248) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils: remove param_bool()Ross Burton2017-12-021-11/+0
| | | | | | | | | | This function is not used by any classes or recipes that I can find, so lets delete it. (From OE-Core rev: a7cd9d1183be603777fc9c8c448281fe01224f7b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: force dnf to refresh the cacheRoss Burton2017-12-021-1/+1
| | | | | | | | | | | DNF has a time-based cache policy (and a great sense of humour) so it's possible that 'dnf makecache' won't actually refresh any caches. Force the cache updates by passing --refresh. (From OE-Core rev: a6e34b6aa194a27db9667af1fb0195ac8fb563f5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runtime_test: simplify postinst testingRoss Burton2017-12-021-63/+19
| | | | | | | | | | | | | | | | | Update the packages and file names to reflect the new postinst recipe. Fix a sh syntax error in the run_serial file exists test which was hidden by a logic problem in the status code. Remove the older test_verify_postinst as it's effectively a subset of test_postinst_rootfs_and_boot, and doesn't work: when booting under systemd the strings it searches for are not output to the console, but the test still passes. (From OE-Core rev: 781a1be88f5812157a231bf5771a01bb978bfcd9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/commands: don't break if get_bb_vars is passed a tupleRoss Burton2017-12-021-1/+1
| | | | | | | | | | | | | get_bb_vars was using variables.copy() to duplicate the list of variables passed but this function only exists in lists [1,2] and not tuples (1,2). Instead of throwing an exception if the variables are in a tuple, simply construct a new list using the passed sequence-like object. (From OE-Core rev: b5837f62c8af94d134cf2160afdfb9e08b3418d1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrodata.bbclass: make upstream version check more useful for git upstreamsAlexander Kanavin2017-11-301-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | Specifically: 1) remove +git${SRCPV} stuff from comparison and output; it's just unnecessary clutter; 2) write the commit id of the latest version tag into the output; this saves quite a bit of trouble of manually checking what that commit id is when doing version updates; 3) when UPSTREAM_CHECK_COMMITS is set, ignore the tags altogether; instead check if the latest commit is different to the one we use, and if so, report that the recipe can be updated to said commit (which is also written into the output, as in 2). Multiple recipes are failing the upstream check because they never issue tags, now we can fix them. (From OE-Core rev: 591d57877d3d3e659d78c0ed33f4c515e3f6f8fb) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Simplify binary data handlingRichard Purdie2017-11-211-12/+8
| | | | | | | | | | | | | I have concerns that bad timing of the flow of data from the logger might corrupt the output due to the way binary strings are handled in qemurunner. This simplifies the code to do the same thing it did before but much more safely. (From OE-Core rev: 1e87283e92a2765bb5d54d17138b208bc395953b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: finish: add dry-run optionPaul Eggleton2017-11-111-12/+36
| | | | | | | | | | | | | | | If you're not sure what changes devtool finish is going to make, or you're not sure you're finished with your modifications, it is useful to be able to see what devtool finish is going to do beforehand, so add a -N/--dry-run option to make that possible. (It's also very useful for debugging devtool finish itself.) (From OE-Core rev: 05f2d5d2ce00c53825ccea5cd9c2262f9d27a638) 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: handle recipes that use named SRC_URI checksumsPaul Eggleton2017-11-111-2/+11
| | | | | | | | | | | | | | | | | | | | | devtool upgrade did not properly handle setting SRC_URI checksums for recipes that use named SRC_URI entries and also use those names in the SRC_URI checksums. A further complication was where the name contained an expression that changed with the version e.g. ${PV} (probably quite rare, but the dnsmasq recipe in meta-networking is currently one such recipe.) All of these are now handled properly. Additionally, drop the _get_checksums() function that wasn't being called from anywhere in the code. Note that this now turns nowrap_vars in recipeutils.py to be a list of regexes, hence things such as [ and ] need to be appropriately escaped. (From OE-Core rev: c914a5e1ad6d96e316746222e5d42f2ba9110060) 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: fix line splitting in patch_recipe_*Paul Eggleton2017-11-111-0/+5
| | | | | | | | | | | | | | | | If a value was split over multiple lines (e.g. as SRC_URI usually is) then we were inserting the value as one item in the lines list with newlines between each line. There's nothing wrong with this if you're writing the list out to a file, but if you want to generate a patch (as patch_recipe_file() will do if the patch parameter is set to True) then the diff output looks a bit odd. Split the value before adding it to the lines list to resolve this. (From OE-Core rev: 44f4c97234623cbd770fbc86eabb04e7e0c91061) 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: fix find_layerdir() to return absolute pathsPaul Eggleton2017-11-111-1/+1
| | | | | | | | | | | | | | | find_layerdir() should really return absolute paths, so make it do so. This fixes devtool finish not deleting files it should do after devtool upgrade if the specified path is relative, since the devtool finish code was assuming that find_layerdir() was returning an absolute path. Fixes [YOCTO #12318]. (From OE-Core rev: 5e3fe00a0233d563781849a44f53885b4e924a9c) 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>
* oeqa/runner: Pass the value of buffer, don't force to TrueRichard Purdie2017-11-111-1/+1
| | | | | | | | The value could be False in which case we should pass that through. (From OE-Core rev: d0a3379bbcbcd8153bd59ccdb56d40fff7ad6c6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Markup further tests for stdout/stderr bufferingRichard Purdie2017-11-112-0/+4
| | | | | | | | | This further cleans up the output of oe-selftest so that runqemu output is hidden unless tests fail. (From OE-Core rev: efa064d5026538ab513edc11869364ce2f14b977) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/target/ssh: Drop command/output logging to debug levelRichard Purdie2017-11-091-1/+1
| | | | | | | | | This ensures the console is kept clear of confusing output but that the main logs contain good debugging information. (From OE-Core rev: caeb5dcfbd3c1d71f8e0eb78b3dd45d5ce349d25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Clean up logger handlingRichard Purdie2017-11-096-41/+26
| | | | | | | | | | | | | | | | | | The logger handling in oeqa was confused at best. This patch: a) Passes in a logger through various qemu runner pieces b) Uses that logger consistently in the code c) Creates a logger for QemuRunner outside the bitbake namespace meaning we don't conflict with the tinfoil logging changes The result of this is more consistency. For runtime tests in testimage, the logs always contain the debug info, nothing is shwon on the console. For the oe-selftests, logs are intercepted and only shown if the test fails. (From OE-Core rev: 4ff678137a55b93c9ba2cbffda34335ba859f704) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>