aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-09-12target-sdk-provides-dummy: skip package_qa_multilib checkKai Kang
The rprovides of target-sdk-provides-dummy don't be updated with multilib, so it fails package_qa_multilib check. Because target-sdk-provides-dummy doesn't install any file to sysroot, it is safe to skip package_qa_multilib check for target-sdk-provides-dummy. Remove ${MLPREFIX}target-sdk-provides-dummy from TOOLCHAIN_TARGET_TASK at same time in populate_sdk_base.bbclass. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12sstate.bbclass: update SSTATE_DUPWHITELISTKai Kang
Update SSTATE_DUPWHITELIST in sstate.bbclass. * remove ${DEPLOY_DIR_RPM}/noarch/ which is not overwritten any more * add directories for package target-sdk-provides-dummy Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12allarch: only enable allarch when multilib is not usedKai Kang
Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g. core-image-sato -> ca-certificates(allarch) -> openssl we expect dependency chain for lib32-core-image-sato: lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl it should install lib32-openssl for ca-certificates but openssl is still wrongly required. Only enable allarch when multilib is not used to fix the issue. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that.Leon Woestenberg
kernel-fitimage.bbclass replaces an occurance of "fitImage" in KERNEL_IMAGETYPE_FOR_MAKE by an image type that is buildable for the architecture (such as zImage). The kernel-fitimage.bbclass packs that image as sub-image in a flattened image tree image (fitImage) and deploys this fitImage along with the image tree source file (.its). kernel-fitimage.bbclass does not alter KERNEL_IMAGETYPES, which thus also contains "fitImage", which kernel.bbclass will also deploy redundantly with different naming. The result is a dual deployment with slightly different naming, each with a set of symlinks. The solution chosen is to have fitImage deployment be handled by kernel-fitimage.bbclass, and have kernel.bbclass ignore fitImage types during deployment. Signed-off-by: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12devicetree.bbclass: don't pad DT overlaysLuca Ceresoli
By default the devicetree class adds padding to the generated .dtb files, which can be needed by the bootloader. However it also pads .dtbo files, which is not useful. Don't apply padding to the overlay devicetrees. To achieve this: * move "-p ${DT_PADDING_SIZE}" to a new variable, DTB_BFLAGS (B for "base") * add "-p 0" to DTC_OFLAGS to disable padding for overlays Cc: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11testimage.bbclass: fix qemu_use_kvm handlingEmmanuel Roullit
QEMU_USE_KVM can either be a boolean or a whitespace separated list of kvm supported machines. For the 'intel-corei7-64' machine, defined in meta-intel, kvm could not be used as the 'x86' substring is not part of its machine name. By changing the order of this 'or' statement and setting the 'QEMU_USE_KVM' variable to 'intel-corei7-64', it is possible to run the 'testimage' task with kvm support successfully. Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07staging: Fix broken debug codeRichard Purdie
The code currently only prints a single depchain due to overwriting data instead of appending. Fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07staging: Ensure we handle glibc-locale do_stash_locale correctlyRichard Purdie
Occasionally we see warnings like: WARNING: core-image-sato-1.0-r0 do_populate_sdk: Manifest /home/pokybuild/yocto-worker/nightly-qa-extras/build/build/tmp/sstate-control/manifest-allarch-nativesdk-linux-libc-headers.populate_sysroot not found in i686_linux allarch (variant '')? which occur when do_populate_sdk is run in an otherwise empty TMPDIR. It occurs because do_stash_locale is not recognised as a setscene task and is removed from the taskgraph meaning the dependency chains fed through setscene_depvalid don't match what was actually setscene'd. That task is recipe specific and not in the global SSTATETASKS so we hardcode the value for now to stop the build warnings. This is going to need to be revisited for a more generic solution. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05populate_base_sdk: Stop running gcc --version all the timeRichard Purdie
Running 'gcc --version' for every image recipe is slow and increases parsing time/resource usage for no good reason. Only compute the value in when we're really running the task/function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05autotools.bbclass: adjust indentation for consistencyChen Qi
All other functions in this class use TAB for indentation while the do_compile function uses '4 spaces'. Adjust it for consistency. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04recipes: Update git.gnome.org addresses after upstream changesRichard Purdie
git.gnome.org is no more. It has ceased to be. It's an ex-git. Please see here: https://about.gitlab.com/2018/05/31/welcome-gnome-to-gitlab/ Note that gitlab does not support git://, only https:// (and ssh). [Commit message from Alexander Kanavin] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04package.bbclass: warn if perms conf file does not existChen Qi
It's possible that the perms conf file specified by FILESYSTEM_PERMS_TABLES does not exist. Currently, this situation is silently ignored, which is likely to lead to further do_rootfs failures. So fix to output a warning, telling user that the specified file in FILESYSTEM_PERMS_TABLES cannot be found. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04libc-package: Add risc-v specific options to cross-localedef invocationKhem Raj
It was otherwise being deferred until boot time Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04distutils-common-base.bbclass: Define commonly used compiler variablesKhem Raj
This is inspired from https://github.com/python/cpython/blob/master/configure.ac Helps cross compiling python C modules in some cases where they do not respect normal CFLAGS Errors like using gcc to link when compiler is clang is fixed Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28cpan.bbclass: make RPATH fix more generalJens Rehsack
Extract a general version of RPATH fix for libxml-parser-perl_2.44.bb from 292471701 libxml-parser-perl: fix "...contains bad RPATH" into cpan.bbclass to catch most errors reported by Khem Raj via http://errors.yoctoproject.org/Errors/Build/66538/ Genrally, Perl 5 toolchain deals with cross-compile sysroots as if a dependency is installed at an exostic place on a server. This issue needs to be addressed wider into the community. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28kernel-yocto: restore BSP audit visibilityBruce Ashfield
During the re-working of kernel fragments and status output cleanup the visibility for BSP level errors was dropped/removed. The audit phase can detect errors, redefinition and invalid configuration fragments. We control the visibility of these reports via the existing KCONF_BSP_AUDIT_LEVEL variable. By default, errors and invalid configuration values will be displayed as a warning. If redefinition values are to be shown the audit level must be raised above the deafult value of '2'. We inhibit these by default, since there are many valid reasons why a BSP will change a default / base config .. and showing them offers no value to the BSP user. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28classes/kernel-yocto: Cleanup getstatusoutput usageJoshua Watt
Replace usage of os.utils.getstatusoutput() with direct subprocess calls. Pass a modified environment and working directory where necessary to bypass the need to execute in a shell. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28sstate.bbclass: make SSTATE_PRUNE_OBSOLETEWORKDIR could be overwrittenKai Kang
Define variable SSTATE_PRUNE_OBSOLETEWORKDIR with '?=' in sstate.bbclass, then it could be overwritten by user configuration. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28terminal.bbclass: use var-SHELL as the shebang of wrapper scriptHongxu Jia
The devshell.bbclass set var-SHELL to var-DEVSHELL, and terminal.bbclass initial var-SHELL with `bash'. Keep sync with it, use var-SHELL rather than hardcoded `/bin/sh' as the shebang of wrapper script. On Ubuntu host, default shell is dash (/bin/sh -> dash), even though we assign var-SHELL with `/bin/bash', the wrapper script is still dashism. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28package.bbclass: only one hardlink of separated debug info file in each ↵Hongxu Jia
directory While multiple hardlinks of binary located in different dirs, there are also multiple hardlinks of separated debug info file with the same binary name in same debug dirs. But in each dir, only one debug file with original name works. Because all of binary hardlinks have one `.gnu_debuglink' which is added in `splitdebuginfo'. It caused gdb could not find debugging symbols. [Before the patch] $ find . ./usr/bin/foo ./usr/bin/foo-hd1 ./usr/bin/.debug ./usr/bin/.debug/foo ./usr/bin/.debug/foo-hd1 ./usr/libexec/foo-hd2 ./usr/libexec/.debug ./usr/libexec/.debug/foo-hd2 $ readelf --debug-dump usr/libexec/foo-hd2 Contents of the .gnu_debuglink section: Separate debug info file: foo $ gdb usr/libexec/foo-hd2 Reading symbols from usr/libexec/foo-hd2...(no debugging symbols found)...done. [Before the patch] [Apply the patch] $ find . ./usr/bin/foo ./usr/bin/foo-hd1 ./usr/bin/.debug ./usr/bin/.debug/foo ./usr/libexec/foo-hd2 ./usr/libexec/.debug ./usr/libexec/.debug/foo $ gdb usr/libexec/foo-hd2 Reading symbols from usr/libexec/foo-hd2...Reading symbols from usr/libexec/.debug/foo...done. [Apply the patch] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-24utils.bbclass: fix KeyError exceptionChen Qi
The following statement was accidently removed. Add it back. values['ml'] = [''] This patch fixes the following error. Exception: KeyError: 'ml' Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23compress_doc.bbclass: Clean up getstatusoutput usageRobert Yang
Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23utils: Fix patch merging errorRichard Purdie
The previous patch has duplicate split calls and one needs to be removed to avoid failures Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23utils: Rely on get_multilib_datastore() to get the original datastoreRichard Purdie
get_multilib_datastore() should be able to handle the original datastore correctly now so rely upon this rather than custom coding. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23linuxloader: Convert to python functionRichard Purdie
We could do with one decent general purpose python function to query the path to the dynamic loader. Convert the shell code into python. Also correct baremetal to return "None", not musl loaders. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23package.bbclass: use bb.utils.break_hardlinks helperRasmus Villemoes
This does the same thing, but is more efficient in case st_nlinks is (already) 1. Depends on bitbake commit 7ae93cf40ab91965147055100432961436bce46c . Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23cpan.bbclass: adopt to recent EU::MMJens Rehsack
The modern the time, the improvements in ExtUtils::MakeMaker. Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching. Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ... Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23sstate: add intel-microcode to SSTATE_DUPWHITELISTYongxin Liu
intel-microcode multilib recipes can generate identical overlapping files: microcode.cpio. Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23classes/package: Clean up getstatusoutputJoshua Watt
Replaces usage of the deprecated oe.utils.getstatusoutput() with Python subprocess calls. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel.bbclass: rename type variable to imageTypeMartin Jansa
* to avoid confusion with "type" command in shell Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel-artifact-names.bbclass: Add 2 more variables to make it easier to ↵Martin Jansa
change all names with one variable * some people don't like the ${MACHINE} in the symlink, because now the DEPLOYDIR already contains ${MACHINE} subdirectory, add KERNEL_ARTIFACT_LINK_NAME variable to change it in one place without the need to list all variables for various artifacts Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel-artifact-names.bbclass, kernel.bbclass: remove prefix and extension ↵Martin Jansa
from MODULE_TARBALL_* variables * for consistency with other artifacts variables, include only the version string, not the actual name or extension * changing .tgz to something else in the MODULE_TARBALL_NAME variable only wouldn't make much sense because then kernel.bbclass still calls "tar -cvzf" to create it Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel*.bbclass: rename *_SYMLINK_NAME variables to *_LINK_NAME and ↵Martin Jansa
*_BASE_NAME to *_NAME * for consistency with IMAGE_NAME and IMAGE_LINK_NAME and to avoid confusion with IMAGE_BASENAME (which is the actual name of the artifact, e.g. PN while KERNEL_IMAGE_BASE_NAME was only the version suffix) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel-artifact-names, kernel-fitimage: add KERNEL_FIT_BASE_NAME, ↵Martin Jansa
KERNEL_FIT_SYMLINK_NAME variables * use the same naming scheme for fitImage files like all other deployed artifacts * remove unnecessary cd to DEPLOYDIR * remove unnecessary cd to B Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21bitbake.conf, kernel-artifact-names.bbclass: introduce IMAGE_VERSION_SUFFIX ↵Martin Jansa
instead of using DATETIME directly * this makes it easier to use different version string than DATETIME, e.g. set from jenkins job while keeping the suffix consistent across all artifacts stored in DEPLOYDIR Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21rootfs-postcommands: put image testdata under sstate controlAndré Draszik
The testdata.json is being written to DEPLOY_DIR_IMAGE directly, thus bypassing sstate, which results in an ever growing list of files. Write them to IMGDEPLOYDIR instead, so as to benefit from the automatic management via sstate. Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>