summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/runtime/dnf: Fix test error when static libs are enabledRichard Purdie2018-06-071-1/+1
| | | | | | | | | | | | | The test works by excluding curl-dev which curl-staticdev depends upon. When static libraries aren't disabled, this leads to an odd looking test failure. Simply exclude curl-staticdev as well in case its enabled to make sure the test always works. (From OE-Core rev: 0a77f4b680332a692abf0231e397fab44c59bde3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: replace Alex Kanavin's @intel email address with a personal oneAlexander Kanavin2018-06-074-6/+6
| | | | | | | | | | As I will be leaving Intel, this address will no longer be valid, so swap it for my personal one for now. (From OE-Core rev: ea58ff101e28dfda3410de66d775df3d8a1e5a96) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/target/ssh.py: increase maximum read bytes from 1024 to 4096Chen Qi2018-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When running testimage task for core-image-sato-sdk, the following error appeared. UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 at position 0: invalid start byte Checking the codes, I found it's caused by setting a 1024 limit for the read method of the StreamReader object. Comments from the manual: """ The chars argument indicates the number of decoded code points or bytes to return. The read() method will never return more data than requested, but it might return less, if there is not enough available. """ When running `systemctl status --full' on target, this error occurs. This patch increase the bytes limit to 4096 to fix the error. (From OE-Core rev: f1fad60ae3be4450aca6058d5665fb10a9148b44) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases/multilib.py: fix test_file_connman skipping logicChen Qi2018-06-041-1/+1
| | | | | | | | | | | | | | | The test_file_connman should be executed only when 'lib32-connman' is installed and 'connman' is not installed. When lib32-connman and connman are both installed, the /usr/sbin/connmand could be from connman or lib32-connman, depending on the installation order. What we want to check is the connmand command from lib32-connman, so we need to make sure that connman is not there to cause chaos. (From OE-Core rev: bc6839394c06bb695b92b2183337e7381da1e86c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases/multilib.py: skip if needed packages are not availableChen Qi2018-06-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | 1) The test cases use 'readelf' command to do the check. This command is from binutils. So skip the test if the needed binutils package is not installed. The related error message in log.do_testimage is like below. Output: sh: readelf: not found 2) The test case tests /lib/libc.so.6 from lib32-libc6. So skip the test if lib32-libc6 is not installed. The related error message in log.do_testimage is like below. Output: readelf: Error: 'lib/libc.so.6': No such file (From OE-Core rev: eae929a5c224f5c3468d6a0466d1bbb3f678a5a1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases/rpm.py: skip if rpm not availableChen Qi2018-06-041-0/+1
| | | | | | | | | | | | This test case should only run when rpm package is installed. So skip it if rpm package is not installed. This fixes: RESULTS - rpm.RpmBasicTest.test_rpm_help - Testcase 1059: FAILED (From OE-Core rev: bb909a60c04248d015d988e4454f0a11b1c287da) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/data.py: fix skipIfNotInDataVarChen Qi2018-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | The var might not be set, resulting in unexpected error. RESULTS - multilib.MultilibTest.test_check_multilib_libc - Testcase 1593: ERROR The above error is due to MULTILIBS being not set, which is the default for OE. This patch fixes this problem. Also, the debugging message in skipIfNotInDataVar is currently confusing. Instead of DEBUG: Checking if 'MULTILIBS' value is in 'multilib:lib32' to run the test it should be DEBUG: Checking if 'MULTILIBS' value contains 'multilib:lib32' to run the test This patch also fixes it. (From OE-Core rev: 3f5c678664a2bba43d99508779dc2ce227cf52a2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/__init__.py: use 'cls' instead of 'obj'Chen Qi2018-06-041-3/+3
| | | | | | | | | | Use 'cls' instead of 'obj' to better reflect that registerDecorator actually serves as a class decorator. (From OE-Core rev: e06e4c859e8be5225d80806a2ebe175f0b152fe1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/__init__.py: set metaclass to ABCMetaChen Qi2018-06-041-2/+2
| | | | | | | | | | | | | | | | | | OETestFilter is a subclass of OETestDecorator. It wants to make use of @abstractmethod decorator. But such decorator requires metaclass to be ABCMeta to have effect. So add it now to achieve the designed behaviour. Comments from python's manual: """ Using this decorator requires that the class's metaclass is ABCMeta or is derived from it. """ (From OE-Core rev: 28c4fafb2322ea8c37bcd7710f22f46ef552a902) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/loader.py: support the 'auto' keywordChen Qi2018-06-041-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In previous OEQA, having 'auto' in TEST_SUITES results in executing as many test cases as possible. This behaviour is broken for now. From the codes in core/loader.py, I can see that it tries to use another keyword 'all'. But in fact, it does not work. I've checked the current manual. The manual says using 'auto'. Below is the current information in manual. """ Alternatively, you can provide the "auto" option to have all applicable tests run against the image. TEST_SUITES_append = " auto" """ So we should restore this behaviour. This patch does so. Also, output warning message is some module is named as 'auto', as this is a reserved keyword. (From OE-Core rev: a65460a063a958cc887c756db5f7ab18e3f5a8c1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: get rid of ROOTFS_RPM_DEBUG in RpmPM()Alexander Kanavin2018-05-291-2/+2
| | | | | | | | | | | | | | | | This was undocumented, and it's better to just always enable full debug output, as this allows immediate generation of logs with full diagnostics when things go not as expected. Also, change the output of dnf from note to debug level; this does not affect what is written to log file, but does reduce the verbosity of bitbake -v. (From OE-Core rev: 9128fd1396729a71b4832a597cf070c2be922d63) 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/sdk/cases/buildgalculator.py: skip if gettext not availableChen Qi2018-05-291-0/+2
| | | | | | | | | | | | | We need to skip this testcase when gettext is not available. Otherwise, we will have the following error at configure. error: possibly undefined macro: AM_NLS (From OE-Core rev: ccc10e95c9fcdabcf4ae5e6f9cc34c1d632b4654) 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>
* rootfs: only use dnf to cleanup if package management is enabledRoss Burton2018-05-221-1/+2
| | | | | | | | | | | | | If package management has been disabled then we've already removed all the state, and running 'dnf clean all' again will simply recreate a lot of the files. (From OE-Core rev: 4524068ad2248b37fb08a24828d018e2f7e6a761) (From OE-Core rev: f23332dc6a0c5b49246b4d17ec4e6fcad0cb7d47) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: expand the removal list for RPMRoss Burton2018-05-221-5/+9
| | | | | | | | | | | | | | If package management is disabled we remove the state and configuration for the package manager after the rootfs has been populated. This list wasn't complete and the DNF/RPM configuration files were left behind. As we've added files to the list (and not just directories), expand the backup/restore package management state code to handle this. (From OE-Core rev: c8a6422457b4d29e6afd1e193b8b921287472137) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/dnf: Add new dnf test casesJose Perez Carranza2018-05-151-0/+40
| | | | | | | | | | | | | Add test cases to test “exclude” and “installroot“ options, also modify the logic of filtering packages on the feed to have all the packages needed by the tests. [YOCTO #10744] (From OE-Core rev: 1121806603c6f621d084b692216f3f616a0768dc) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/case: fix typoHongxu Jia2018-05-111-5/+5
| | | | | | | | | | s/meta-sefltest/meta-selftest/g (From OE-Core rev: e1672e36a653a1d0efb0999c60bf3c56c1983c02) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases/python: use python 3 rather than python 2Alexander Kanavin2018-05-041-3/+3
| | | | | | | | | | For example, core-image-sato skipped the test alltogether, as it no longer pulls in Python 2.x at all. (From OE-Core rev: 5ad0fe9ac6b6362011a17afaa7bee8e788093915) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* btrfs-tools: update to 4.15.1Alexander Kanavin2018-05-041-1/+1
| | | | | | | | | | | | | | | Drop upstreamed 0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch Add ftw-subdir-walk.patch as it resolves the RECIPE_NO_UPDATE_REASON. Add --disable-zstd as libzstd isn't provided in oe-core. Fix wic testcase, as the minimal fs size is now bigger. (From OE-Core rev: 94b645aa77a4193371e8c77ddc477ec00d858961) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* logrotate: update to 3.14.0Yi Zhao2018-05-041-2/+2
| | | | | | | | | | | | | Since the wtmp and btmp definitions had been moved from logrotate.conf to logrotate.d in this release, we also need to install them to /etc/logrotate.d/. Also update oeqa runtime logrotate test case. (From OE-Core rev: 5b4aedd6b18b6ba6ca1bcd460a0b51ced41656cd) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runqemu: qemu nfs testing not ready for deploymentRichard Purdie2018-04-201-1/+3
| | | | | | | | | | | | This test shouldn't have merged yet since we don't run portmap/rpcbind on the autobuilder infrastructure and the test therefore cannot succeed. We need to document this, set it up, then enable the test. The test itself is fine and good to have so its left in the code but disabled for now. (From OE-Core rev: 9640af873d490c5d22b70e32d918c2db37371d21) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: runqemu: add tests for qemu boot and shutdownYeoh Ee Peng2018-04-201-2/+68
| | | | | | | | | | | | QA team were testing qemu boot image and shutdown on each qemu architecture manually. Add automated test to test qemu boot on ext4 and nfs, finally check that it can shutdown properly. (From OE-Core rev: 1df5f2dff832528905ff6fcf1d324619fb3d307f) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: use single quotes for path passed to file in is_elf()Andre McCurdy2018-04-201-2/+1
| | | | | | | | | | | | | Align package.py is_elf() with recent changes in package.bbclass isELF(): http://git.openembedded.org/openembedded-core/commit/?id=7877761534b0c2492da6289e9f2269d41b6ed464 (From OE-Core rev: ab056c7f6065f310be4dd256ceb45f85ff981f69) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add '-b' option to file call in isELFMark Hatle2018-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isELF function works by running: result = file <pathname> if 'ELF' in result By default 'file' will prepend the result with the path name of the file that is being checked. This usually works fine, such as: $ file /home/foo/openembedded-core/meta/classes/package.bbclass /home/foo/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines However, if the path includes 'ELF', ELF will end up in the result, and then the check will return positive. $ file /home/ELF/openembedded-core/meta/classes/package.bbclass /home/ELF/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines This will then result in the isELF coming back true, and possibly causing the checks that use isELF, such as the 'is it already stripped' check, to do the incorrect thing. Adding the '-b' option to file will result in the path being omitted in the result: $ file /home/ELF/openembedded-core/meta/classes/package.bbclass Python script, ASCII text executable, with very long lines (From OE-Core rev: 5a324e9b2cf6378f8eaa4e394f9cb36d4e2680ac) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/stap.py: add runtime test for systemtapVictor Kamensky2018-04-182-0/+34
| | | | | | | | | | | | | | | | Add runtime test for stap to test basic SystemTap operations: can compile very basic module and run on target device. Note we disable (-DSTP_NO_VERREL_CHECK) SystemTap additional kernel release check since during OE testing mismatching kernel-devsrc and kernels are used. (From OE-Core rev: 659d19fcddb7edaca8f5221148d479e73304b430) Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Ensure added layer sets LAYERSERIES_COMPATRichard Purdie2018-04-071-0/+1
| | | | | | | | | | Now that we see warnings if LAYERSERIES_COMPAT is unset, the auto generated code from devtool needs to set this to avoid warnings which break various tests. (From OE-Core rev: f65ebfeda0bfbac78e4a2a6609ba654ca38a8b0e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/oeqa: Ensure added layers set LAYERSERIES_COMPATRichard Purdie2018-04-071-1/+1
| | | | | | | | | | Now that we see warnings if LAYERSERIES_COMPAT is unset, the auto generated code from devtool/oeqa needs to set this to avoid warnings which break various tests. (From OE-Core rev: 27568410ebb0d40db3428550704f35199df0e034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: run postinst interceptsAlexander Kanavin2018-04-051-0/+12
| | | | | | | | | | | | | | Previously this wasn't done, and so any packages installed from populate_sdk would not have the postinsts fully executed (particularly generation of various caches via running nativesdk or target binaries with qemu wasn't working). [YOCTO #12630] (From OE-Core rev: a484ff072eea3f47de2c3348048201249cefa46b) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: do not hardcode the task name when referring to log filesAlexander Kanavin2018-04-051-4/+4
| | | | | | | | | This can be do_rootfs or do_populate_sdk, or anything else. (From OE-Core rev: e2e05a327e51339d45b53e0276c287ab314e3385) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: move intercept running logic from rootfs class to ↵Alexander Kanavin2018-04-052-63/+59
| | | | | | | | | | | | | PackageManager class This allows running the intercepts when creating SDKs, which previously wasn't possible, as SDK code does not use the rootfs class, and calls into PackageManager methods directly. (From OE-Core rev: f830388c5e9125f385a42acd7365d1235967b57c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: move postinst_intercept dir initialization from RootFS ↵Alexander Kanavin2018-04-052-18/+20
| | | | | | | | | | | | to PackageManager class This will allow handling postinst_intercepts when populating SDKs (which use PackageManager class directly, and do not utilize RootFS class). (From OE-Core rev: 9454fd328040fd58c981d028a74fcf181bde8e89) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: move target_rootfs property to common ancestor classAlexander Kanavin2018-04-051-9/+7
| | | | | | | | | | This will be useful when also moving postinst_intercept handling to package manager class from rootfs class. (From OE-Core rev: a4cd69bdd5b9dfa1125887f4d9038d41996e39c7) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Skip gpgcheck while using dnf on targetManjukumar Matha2018-04-051-1/+1
| | | | | | | | | | | | | By default, RPM_SIGN_PACKAGES is not defined. Add gpgcheck=0 to oe-remote-repo.repo file, otherwise dnf will complain during install operation on target Note, RPM_SIGN_PACKAGES is set only when you inherit sign_rpm explicitly (From OE-Core rev: 002a71eaa7606828c399972d8fd35e19e7b71929) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory_analysis.py: Check if RPROVIDES changed orderAmanda Brindle2018-04-031-1/+13
| | | | | | | | | | | | | | Instead of assuming order has changed if no package has been added or removed, loop through packages to check if order has changed. This will prevent the script from falsely reporting "changed order" if a version has increased. Fixes [YOCTO #12334] (From OE-Core rev: 77d701c5fb5961bd818810a4d4cb3a9bd2432fae) Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make-mod-scripts/kernel-devsrc: Fix objtool issuesRichard Purdie2018-03-301-1/+1
| | | | | | | | | | | | | | | | | | | Kernels which use tools/objtool can now fail when building external modules due to objtool being missing, the generated files can also cause problems for kernel-devsrc. Ensure objtool is generated in make-mod-scripts by also calling "make prepare". For devsrc, delete the generated binaries since they'd be native binaries and unsuitable for the target. The oeqa kernel module tests also need to have the additional "make prepare" step added. (From OE-Core rev: 52fd2993784b4218f5df4f343e7da45d964df305) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package-index: index also subdirectories when using rpmAlexander Kanavin2018-03-201-3/+17
| | | | | | | | | | | | | | | | Previously only the top-level index was created, which did not work if PACKAGE_FEED_ARCHS whitelisting (or explicitly listing architectures in dnf repo files by hand) was in use: https://lists.yoctoproject.org/pipermail/yocto/2018-March/040327.html https://bugzilla.yoctoproject.org/show_bug.cgi?id=12419 [YOCTO #12419] (From OE-Core rev: f2a568ddb22f38114fdbc1d389c7556386ebb1fa) 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>
* patch.py: Use git format-patch with --no-signature --no-numbered paramsMartin Jansa2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | * --no-signature saves unnecessary .patch modifications when executed on host with different git version * --no-numbered saves unnecessary .patch modifications when number of the applied patches is changed (the number is still in the filename so the order how they should be applied is still preserved) * both options exist for very long time, I've tested them with git 1.9.1 from Ubuntu 14.04 and I'm quite sure they were available even in much older releases, so there shouldn't be any issue on relatively new sanity tested distros (From OE-Core rev: ad76fa92c3a5be38962aff09df070ffd9756f777) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: format pydoc comments properlyRoss Burton2018-03-201-103/+92
| | | | | | | (From OE-Core rev: b2770ec717d2b3cfc475c0cf7fa372fdb2f691a9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildperf: measure the size of core-image-sato rootfsRoss Burton2018-03-161-2/+2
| | | | | | | (From OE-Core rev: c94271d87d16323f920891344642f76dfb3c994f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/patch.py: add a warning if patch context was ignoredAlexander Kanavin2018-03-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignoring patch context increases the chances of patches being applied incorrectly. Depending on what code is being patched, this can go completely unnoticed and create subtle bugs, sometimes with security implications. Please see here for a specific example: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450 On the other hand, we cannot simply force all patch context to match exactly: doing this would break a lot of recipes suddenly, across all layers. So let's try a softer approach: issue a warning, and gently update patches over a longer span of time. When most of the warnings are eliminated, we can start enforcing a strict patch application policy. I do understand that this patch creates a lot of warnings all of a sudden, however I believe the problem does need to be addressed. All of oe-core recipes have their context already fixed. Sample warning: WARNING: vulkan-1.0.61.1-r0 do_patch: Some of the context lines in patches were ignored. This can lead to incorrectly applied patches. The context lines in the patches can be updated with devtool: devtool modify <recipe> devtool finish --force-patch-refresh <recipe> <layer_path> Then the updated patches and the source tree (in devtool's workspace) should be reviewed to make sure the patches apply in the correct place and don't introduce duplicate lines (which can, and does happen when some of the context is ignored). Details: Applying patch demos-Don-t-build-tri-or-cube.patch patching file demos/CMakeLists.txt Hunk #1 succeeded at 63 (offset 2 lines). Hunk #2 succeeded at 76 with fuzz 1 (offset 2 lines). [YOCTO #10450] (From OE-Core rev: 5133fd46bccf14e21680f8d94e952914edccb113) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add a test for failing package post-installation scriptletsAlexander Kanavin2018-03-151-0/+37
| | | | | | | | | | | | | | The test runs a scriptlet that has an intentionally failing command in the middle and checks for two things: 1) that bitbake does warn the user about the failure 2) that scriptlet execution stops at that point. The test is run for all three package types: rpm, deb, ipk. (From OE-Core rev: 865fafb0dff19d27bd417c28c95fb8fdf0326a2b) 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: warn about failing scriptlets for all ↵Alexander Kanavin2018-03-151-3/+15
| | | | | | | | | | | | | | | | package types Previously this was done only for rpm packages; now also ipk/deb scriptlet failures are reported. In the future this will become a hard error, but it can't yet happen due to the legacy 'exit 1' way of deferring scriptlet execution to first boot which needs a deprecation period. (From OE-Core rev: a36671faf6e0b7623185b0e22814a786d5444592) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/patch.py: do not leave .orig files if a patch isn't perfectly ↵Alexander Kanavin2018-03-111-1/+1
| | | | | | | | | | | | | | matching Particularly, this was causing 'devtool modify' to erroneously add those .orig files into commits. This was getting in the way, if the goal was to amend/update those existing patches. (From OE-Core rev: f4f3406c3bd9599d7a19275475d52bda4c42f2ab) 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>
* package_manager.py: Explicit complementary failNiko Mauno2018-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running bitbake -c populate_sdk <image_name>, it is expected that packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting SDK. Underlying mechanism issues a package manager install call for set of complementary packages. However the mechanism doesn't seem to inform the user all too obviously in case the package manager command behind install_complementary() method fails -- and since it is combined with attempt_only=True option, user might end up wondering why several *-dev, *-dbg packages are missing from resulting SDK. Improve associated install() method behaviour in affected OpkgPM and DpkgPM classes so that a problematic state of affairs becomes directly obvious for bitbake user, resulting in shell output like: WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages. Command '...' returned 1: Collected errors: * Solver encountered 1 problem(s): * Problem 1/1: * - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but none of the providers can be installed * * Solution 1: * - allow deinstallation of someotherpkg-1.1-r1.x86 * - do not ask to install a package providing somepkg-dev * Solution 2: * - do not ask to install a package providing somepkg-dev (From OE-Core rev: 2502bd591c37bf532d02dc6b37fc1e8b5224fb0a) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: remove duplicate renamesAnuj Mittal2018-03-081-2/+11
| | | | | | | | | | | | | | | | | | In cases when a package like qemu might have files with same names in multiple directories, the rename logic might go wrong and create multiple rename pair for a single directory. Make sure that we process each rename pair once. Also, don't print FILELIST as part of PKGSIZE to ensure that it gets printed only once when reporting package changes. Fixes [YOCTO #12559] (From OE-Core rev: cff000c43d6e9a183911338951026dfbef88f838) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Print offending package instead of non-sense traceJason Wessel2018-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have a package that does not generate a manifest due to using a noexec rule, the package name should be printed so the problem can be tracked down. With out the patch you get an error that makes it look more like the package_manager is broken as shown below. oe-core/meta/lib/oe/package_manager.py', lineno: 534, function: create_packages_dir 0530: 0531: for dep in rpmdeps: 0532: c = taskdepdata[dep][0] 0533: manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs) *** 0534: if not os.path.exists(manifest): 0535: continue 0536: with open(manifest, "r") as f: 0537: for l in f: 0538: l = l.strip() File: '/usr/lib/python3.5/genericpath.py', lineno: 19, function: exists 0015:# This is false for dangling symbolic links on systems that support them. 0016:def exists(path): 0017: """Test whether a path exists. Returns False for broken symbolic links""" 0018: try: *** 0019: os.stat(path) 0020: except OSError: 0021: return False 0022: return True 0023: Exception: TypeError: stat: can't specify None for path argument (From OE-Core rev: 21924fdba286e5962b1680601664dc0491527e25) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftests: Add test case for booting a generic EFI boot partition imageCalifornia Sullivan2018-03-061-0/+45
| | | | | | | | | | | | | Simple test case that adds 'efi' to MACHINE_FEATURES, sets WKS_FILE to "efi-bootdisk.wks.in", installed required boot items, and attempts to boot the wic image. Quick check to make sure that the feature actually works. (From OE-Core rev: 192c8738f4a8d0f82848a440acf24a1892f2ce93) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: only install locales if we're using glibcRoss Burton2018-03-061-0/+4
| | | | | | | | | Using glibc-locale to install locales only makes sense if we're using glibc. (From OE-Core rev: 8fc80734053645fa893694dfe33ddaee99aa9a1a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/opkg.py: add runtime test for opkgYeoh Ee Peng2018-03-041-0/+47
| | | | | | | | | | | | | Add runtime test for opkg to test that it can install ipk package from remote source. [YOCTO# 11488] (From OE-Core rev: 9dd4af2b70f58540b2799823957aff3413068126) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/apt.py: add runtime test for aptYeoh Ee Peng2018-03-041-0/+47
| | | | | | | | | | | | | Add runtime test for apt to test that it can install deb package from remote source. [YOCTO# 11488] (From OE-Core rev: f380fa77d69051212fdf7dff97da611e884d05d2) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: generate locale archive and remove packagesRoss Burton2018-03-011-2/+54
| | | | | | | (From OE-Core rev: c6f1010a47df33b40320aa5784181b659a3254d7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>