aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-08-20dos2unix.bbclass: Move to oe-coreKhem Raj
- Import from meta-oe layer - This is useful for many packages where CR-LF needs to be adjusted, many recipes depend on it e.g. meta-multimedia libebml and so on. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16populate_sdk_base.bbclass: inherit and use image-postinst-interceptsChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16image.bbclass: inherit and use image-postinst-interceptsChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16image-postinst-intercepts.bbclass: add classChristopher Larson
This class sets POSTINST_INTERCEPTS and POSTINST_INTERCEPTS_CHECKSUMS, to allow us to pull intercepts from BBPATH. This is kept as a separate class, as it's needed by both image construction and sdk construction, the latter to support meta-toolchain & similar recipes. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handlingRichard Purdie
Using re.compile() is around six times faster than recompiling the regexp each time so maintain a cache. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping ↵André Draszik
base-passwd|shadow-sysroot recipes Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying the base-passwd|shadow-sysroot recipes to be excluded from a recipe sysroot. Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping *-initial recipesAndré Draszik
Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying the *-initial recipes to be excluded from a recipe sysroot. Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15sstate: allow specifying indirect dependencies to exclude from sysrootAndré Draszik
Currently, a dependency on any -native recipe will pull in all dependencies of that -native recipe in the recipe sysroot. This behaviour might not always be wanted, e.g. when that -native recipe depends on build-tools that are not relevant for the current recipe. This change adds a SSTATE_EXCLUDEDEPS_SYSROOT variable, which will be evaluated for such recursive dependencies to be excluded. The idea is similar to http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html except that the list is not hard-coded anymore. SSTATE_EXCLUDEDEPS_SYSROOT is evaluated as two regular expressions of recipe and dependency to ignore, e.g. in the above flex-native / bison-native use-case, one would specify SSTATE_EXCLUDEDEPS_SYSROOT = ".*->(flex|bison)-native" in layer.conf. The existing special handling of "-initial" as well as "base-passwd" and "shadow-sysroot" could also be streamlined: SSTATE_EXCLUDEDEPS_SYSROOT += "\ .*->.*-initial.* \ .*(base-passwd|shadow-sysroot)->.* \ " Another anticipated user is meta-java, where certain newer JDKs can only be bootstrapped (built) using older JDKs, but it doesn't make much sense to copy all those older JDKs and their own build tools (ant, etc.) into the sysroot of recipes wanting to be built using the newer JDK (only), e.g.: SSTATE_EXCLUDEDEPS_SYSROOT += "\ openjdk-8-native->(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make-native|openssl-native|zip-native|unzip-native) \ " Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15cve-check.bbclass: do not download the CVE DB in package-specific tasksKonstantin Shemyak
Disable downloading of the vulnerability DB in do_check_cves() task. When invoked in this task, cve-check-tool attempts re-download of the CVE DB if the latter is older than certain threshold. While reasonable for a stand-alone CVE checker, this behavior can cause errors in parallel builds if the build time is longer than this threshold: * Other tasks might be using the DB. * Several packages can start the download of the same file at the same time. This check is not really needed, as the DB has been downloaded by cve_check_tool:do_populate_cve_db() which is a prerequisite of any do_build(). The DB will be at most (threshold + build_time) old. Signed-off-by: Konstantin Shemyak <konstantin.shemyak@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15image: Use ${COREBASE}/meta for timestamp, fallback to bitbake.confAlex Kiernan
To handle the case where ${COREBASE} isn't the git directory, avoid erroring out when the git command fails. If we don't have a timestamp after this, fall back to the timestamp from conf/bitbake.conf. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15package.bbclass: improve -dbg and -src package orderingRasmus Villemoes
nativesdk-gpgme fails package_qa when setting PACKAGE_DEBUG_SPLIT_STYLE = "debug-with-srcpkg". ERROR: nativesdk-gpgme-1.10.0-r0 do_package_qa: QA Issue: non debug package contains .debug directory: nativesdk-python3-gpg path /work/x86_64-nativesdk-oesdk-linux/nativesdk-gpgme/1.10.0-r0/packages-split/nativesdk-python3-gpg/usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python3.5/site-packages/gpg/.debug/_gpgme.cpython-35m-x86_64-linux-gnu.so [debug-files] This turns out to be because the automatic moving of the -dbg package to the beginning of the package list is disabled in that case, so the python3-gpg packages that the recipe prepends to PACKAGES ends up before the -dbg package. It's not clear why the "and not split_source_package" was added when debug-with-srcpkg was introduced. Presumably the intention was to prevent the -dbg package to end up before the -src package, which we of course need to. But at the same time, we still need -dbg packages to end up before all other packages. Using list.insert(0, ...) also means that if there happens to more than one -dbg package, their relative ordering gets inverted in the new list. This tries to fix these issues by sorting the packages by (priority, original position), where priority is 10 for -src, 30 for -dbg and 50 for everything else. That guarantees that packages of the same "type" preserve their relative ordering, while also ensuring that -dbg always preceed other packages. This scheme is also quite extensible, and, should the need arise, one could even expose the priorities as a knob the recipe author could use to ensure specific orderings of packages instead of the somewhat fragile and coarse-grained method of "prepend or append, and ensure you do that in a proper order". Probably the autodebug condition needs to stay, but I think the split_source_package condition in the preceding elif should be removed, so that that logic applies to all packages called -src, not just the one we might have created a few lines above. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15sstate/lib.oe.path: Ensure file sparseness is preservedRichard Purdie
Files when restored from sstate were missing their sparseness. Fix up various functions to preserve this and make things more deterministic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15sstate: Ensure a given machine only removes things which it createdRichard Purdie
Currently if you build qemux86 and then generic86, the latter will remove all of the former from deploy and workdir. This is because qemux86 is i586, genericx86 is i686 and the architctures are compatible therefore the sstate 'cleaup' code kicks in. There was a valid reason for this to ensure i586 packages didn't get into an i686 rootfs for example. With the rootfs creation being filtered now, this is no longer necessary. Instead, save out a list of stamps which a give machine has ever seen in a given build and only clean up these things if they're no longer "reachable". In particular this means the autobuilder should no longer spend a load of time deleting files when switching MACHINE, improving build times. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15image: Add locale archive optimisationRichard Purdie
Refactor the locale archive function from the SDK to also make it work during general image creation. This reduces the size of the locales from 900MB to 220MB in core-image-lsb-sdk. The exception handling around subprocess was dropped as the standard subprocess exception printing is better handled than the catchall exception. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14classes: sanity-check LIC_FILES_CHKSUMRoss Burton
We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this, which can lead to problems if you have a URI that resolves to a path of / as Bitbake will then dutifully checksum / recursively. [ YOCTO #12883 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14package: Fix file copying to preserve sparse filesRichard Purdie
We want to preserve sparse files when building the system, add the option to tar to ensure we do this when copying files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14multilib-script: Fix ALTERNATIVE_${PN} overwrite issueZhixiong Chi
If multilib scripts handle more than one file per package, the variable ALTERNATIVE_${PN} will be overwritten and there will be only one symbol link file. Append to the variable to avoid this. Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directivesJaewon Lee
The devtool-source class moves all local files specified in SRC_URI to an oe-local-files directory. When using devtool and a recipe space kernel-meta, devtool modify throws an error because the paths the kernel-yocto class is looking for feature directories in, don't include the oe-local-files directory which devtool is using. This patch checks for feature directories in oe-local-files, and if present, adds that path to include directives. [YOCTO #12855] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14devtool-source.bbclass: Support kernel-fragments/patch not in SRC_URIJaewon Lee
When using a recipe space kernel-meta, scc files are added through SRC_URI, but they may include corresponding kernel fragments or patches that are not necessarily in SRC_URI. For bitbake, this is not a problem because the kernel-yocto class adds the path where the .scc file was found to includes which consequentially makes the .cfg, .patch file available to the kernel build. However, when using devtool, only files specified in SRC_URI are copied to oe-local-files in devtool's workspace. So if the cfg/patch file is not in SRC_URI, it won't be copied, causing a kernel build failure when trying to find it. This fix parses local .scc files in SRC_URI, copies the corresponding .cfg/.patch file to devtool's workdir, and also adds it to local_files so it is available when doing a devtool build for the kernel. [YOCTO #12858] v2: also supporting patch not in SRC_URI v3: fix spacing issues Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14sstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELISTRichard Purdie
Replace the generic whitelist entry with entries for the three specific 'problem' cases in OE-Core. This means the general DEPLOY_DIR_IMAGE entry doesn't mask problems for others as was recently encoutered by users reported on irc. In the whitelisted cases they occur only in multilib builds and the files are identical. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08sstate: Add sstate usage summary to the buildRichard Purdie
Currently the user has no indication of how much sstate was already present or that would be used by the build. This change adds some summary information so that the user can see how much reuse is occurring. To fully work it needs some extra information from a recent bitbake commit but this is optional. When combined with bitbake --dry-run this feature can be used to check if sstate would be reused in a build. [YOCTO #12749] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08classes/sanity: Clean up getstatusoutput usageJoshua Watt
Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-08-08classes/reproducible_build: Avoid dereferencing symlinksJoshua Watt
Using os.path.getmtime() will dereference symbolic links in an attempt to get the last modified time. This can cause errors if the target doesn't exist, or worse map to some absolute build host path which would make a build not reproducible. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08devicetree.bbclass: User/BSP device tree source compilation classNathan Rossi
This bbclass implements the device tree compilation for user provided device trees. In order to use this class, it should be inherited in a BSP recipe which provides the sources. The default setup enables inclusion of kernel device tree sources (though can be disabled by the recipe by overriding DT_INCLUDE or KERNEL_INCLUDE). This provides an additional mechanism for BSPs to provide device trees and device tree overlays for their target machines. Whilst still enabling access to the kernel device trees for base SoC includes and headers. This approach to providing device trees has benefits for certain use cases over patching the device trees into the kernel source. * device trees are separated from kernel source, allows for selection of kernel and or kernel versions without needing to explicitly patch the kernel (or appending to the kernel recipes). * providing device trees from separate sources, from the layer, generated by the recipe or other recipes. This class also implements some additional features that are not available in the kernel-devicetree flow. This includes population of device tree blobs into the sysroot which allows for other recipes to consume built dtbs (e.g. U-Boot with EXT_DTB compilation), device tree overlay compilation and customizing DTC compilation args (boot cpu/padding/etc.). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Acked-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07toolchain-scripts: put TARGET_ARCH and TARGET_OS into environmentRoss Burton
It's useful for the SDK to know exactly what TARGET_ARCH and TARGET_OS are, specifically for SDK QA. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07cmake: fix linking in multilib SDKsRoss Burton
CMake, in it's infinite wisdom, when searching for libraries (using find_library) will look inside the libraries PREFIX/lib, PREFIX/lib32, and PREFIX/lib64. In a multilib SDK more than one of these will exist (potentially all three) and obviously for a given build configuration only one of those is valid. This search path is hard-coded deep inside CMake but by setting CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX we can bypass it and set an explicit lib<SUFFIX> to use. Do this by writing ${baselib} into the environment file, and then stripping "lib" from this to obtain the suffix in the cmake-specific environment script, which is then read in the CMake toolchain. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02python[3]native: allow use of both native Python 2 and 3Ross Burton
Instead of both classes using ${PYTHON_PN} (which is set by python-dir and python3-dir), hardcode the right values so that it is possible to inherit both pythonnative and python3native at the same time. If both are inherited then both native Pythons are available, but the last to be inherited will be the one to set PYTHON. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02meson: don't dump full error log on failureRoss Burton
If the configure fails then we don't really want to see hundreds of lines of test output (this would be similar to dumping out autoconf's config.log). The error includes the path of the full log if further debugging is required. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-01multiconfig: Enable multiconfig dependencies on oe-coreAlejandro Enedino Hernandez Samaniego
This patch enables multiconfig dependencies (mcdepends) to be used on recipes using the following format: task[mcdepends] = "multiconfig:FROM-MC:TO-MC:PN:task-to-depend-on" For the sake of simplicity consider the following example: Assuming we have set up multiconfig builds, one for qemux86 and one for qemuarm, named x86 and arm respectively. Adding the following line to an image recipe (core-image-sato): do_image[mcdepends] = "multiconfig:x86:arm:core-image-minimal:do_rootfs" Would state that core-image-sato:do_image from x86 will depend on core-image-minimal:do_rootfs from arm so it can be executed. This patch makes modifications to bitbake.conf to enable mcdepends, and to sstatesig and staging.bbclass to avoid conflicts between packages from different multiconfigs. [YOCTO #10681] Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31package.bbclass: Fix hardlink preservation issueRichard Purdie
Recent changes broke the preservation of hardlinks during processing due to a missing index. Fix this, reducing the size of the git recipe packages in particular (it contains many hardlinks). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31multilib_script: Add support for multilib scriptsRichard Purdie
Whilst the package managers handle multilib ELF binaries well, they don't handle scripts in the *bindir directories well. This adds support for marking these up so that they can be handled using update-alternatives. Its done this way so that non-multilib systems don't see any changes and there is standardisation amongst the multilibs on how the alternatives are named and prioritiesd. The priotitisation code needs to be added but this change means there is somewhere to add it. Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g. MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2" to indicate which script files to process from which packages. libtool is used a as a reference to stop the libtool scripts conflicting in a multilib case and allows the kernel-devsrc change to be merged. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-30distutils/distutils3: do not try to fetch code during do_configureHongxu Jia
For distutils3, any setup.py invoking will cause setup_requires argument to trigger a code fetching. Since the following commit applied in oe-core, code fetching occurs during do_confugire before the do_compile. ... b805cef distutils: clean the build tree in do_configure ... Refer what do_compile did, add var-NO_FETCH_BUILD to do_configure. Sync with distutils3, add do_configure to distutils also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30testsdk.bbclass: check python module testtools and subunitRobert Yang
The testtools or subunit is not part of python's standard library, so check them before use. Fixed when they are not installed on host: $ bitbake core-image-minimal -ctestsdk Exception: ImportError: No module named 'testtools' Now it can run with a warning: WARNING: core-image-minimal-1.0-r0 do_testsdk: Failed to import testtools or subunit, the testcases will run serially Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30package.bbclass: append to FILERPROVIDES_*/FILERDEPENDS_* variables instead ↵Martin Jansa
of setting them * this allows to work around some of the issues with file-rdeps * e.g. in my case I have /usr/lib/libmali.so.0.1 which according to rpmdeps provides only following libmali* libmali.so(LIBMALI_1.0) libmali.so.0.1 but many users of this link with libmali.so directly and according to rpmdeps require libmali.so which causes file-rdeps for a lot of recipes * I was using simple work around to just set: RPROVIDES_${PN} = "libmali.so libGLESv2.so libEGL.so" but that doesn't work well with multilib, because the value gets expanded with MLPREFIX and RPROVIDES_${PN} = "lib32-libmali.so lib32-libGLESv2.so lib32-libEGL.so" doesn't help at all. [YOCTO #9217] Many unsolveable QA warnings from build-deps and file-rdeps Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26classes/package: fix variable name in commentPaul Eggleton
The variable is PACKAGE_WRITE_DEPS as seen in the default below the comment. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26autotools.bbclass: fix autoreconf bbnote commandline argumentsAndre McCurdy
Leaving -Wcross out of the bbnote version of the autoreconf command seems to be a long standing inconsistency (dating back to the very first commit in oe-core) but there's no obvious reason to do so. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26lib/oe: split out machine to ELF data dictionaryRoss Burton
2018-07-26distutils/setuptools, distutils3/setuptools3: improve reproducibilityHongxu Jia
- Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools - Supply "--root" directory to the "install" command, and use it as a prefix to strip off the purported filename encoded in bytecode files. (It strips build path prefix from .pyc files) [YOCTO #8446] [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia
fetch code during do_compile If a python recipe is using setuptools and the setup_requires argument, where setuptools will use easy_install to fetch the module if it isn't present. The build failed on a machine where a proxy was required, but succeeded on a machine which had direct access to the internet Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not allow to fetch code from internet during do_compile. Example result: ... ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "setup.py", line 56, in <module> ... The improvement is flexible for test_requirements argument (used at `setup.py test'), where use easy_install also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-25license_image: Fix raceRichard Purdie
The current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures. To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass. This fixes bugs which show up as: NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started ERROR: core-image-minimal-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:write_deploy_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest 0029: 'w+').write(output) 0030:} 0031: 0032:python write_deploy_manifest() { *** 0033: license_deployed_manifest(d) 0034:} 0035: 0036:python license_create_manifest() { 0037: import oe.packagedata File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest 0187: # It is necessary to mark this will be used for image manifest 0188: man_dic[dep]["IMAGE_MANIFEST"] = True 0189: man_dic[dep]["PN"] = dep 0190: man_dic[dep]["FILES"] = \ *** 0191: " ".join(get_deployed_files(dep_dic[dep])) 0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: 0193: for line in f.readlines(): 0194: key,val = line.split(": ", 1) 0195: man_dic[dep][key] = val[:-1] File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files 0285: """ 0286: 0287: dep_files = [] 0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest: 0290: all_files = manifest.read() 0291: for f in all_files.splitlines(): 0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and 0293: not os.path.basename(f) in excluded_files): Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy' ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537 NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1' NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25license: Split image license functions to a separate classRichard Purdie
This means the image code is only included in image recipes through the IMAGE_CLASSES variable. This sets things up to allow us to fix image deploy dependency problems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25package: Use subprocess to be consistent with the rest of the classRichard Purdie
Using 'sub' in one function just confuses things, standardise and fix formatting of the parameters too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie
This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie
After this replacement, the parent exception handling works so we don't need subprocess wrapping with bb.error in the underlying functions. The underlying contexts also have better module handling so the imports can be cleaned up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Clean up getstatusoutput usageRichard Purdie
Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. The call is just a wraper to the subprocess call of the same name and requires the caller to handle exceptions themselves. We usually do this badly, failing to show the output or the command or the return code. Its much safer to rely on a call like subprocess.check_output() instead. This also makes it easier to spot and remove cases where shell=True isn't needed in a later cleanup. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24sstate/bitbake.conf: Use pigz if availableRichard Purdie
Currently the compression of sstate objects is single threaded. In the case of ltp, this takes around 33s. If we add pigz into the list of non-fatal HOSTTOOLS and then use if it available when building the sstate object, this time drops to around 6s. Since pigz is now widely available this is an optimisation we should utilise. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Call file to determine elf status in parallelRichard Purdie
This allows the calls to is_elf (which calls file) to happen in parallel allowing a speedup of do_package and do_populate_sysroot for native recipes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Refactor to remove isElf/is_elf function duplicationRichard Purdie
There are probably further cleanups needed here but this at least removes the major code duplication between these two similar funcitons, keeping the kernel module ".ko" extension check for efficiency to avoid opening and reading file contents in the general case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Allow parallel processing of shlib analysisRichard Purdie
This function is a bit more invasive to add parallelism to but allows the shlibs analysis to happen in multiple threads. In order to return values correctly/safely the data types needed tweaking to avoid lists and use immutable objects. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Allow parallel processing of debug splittingRichard Purdie
Adjust the code so that the splitting of debug symbols from files happens in parallel. To to this we need to move some path handling code into the main function and pass more parameters in. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>