aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
AgeCommit message (Collapse)Author
2018-04-05package_manager: fix install_glob to use morty sdk pkgdirArmin Kuster
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05sdk: streamline locale removalRoss Burton
For some reason dnf is aborting with the fairly useless "failed to read RPMDB" error during SDK creation. Luckily as we're just deleting locale packages we can pass False to remove() to use RPM directly, which doesn't crash. (From OE-Core rev: cb118806841e585ec6ca820360329ae7d122c0af) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05sdk: generate locale archive and remove packagesRoss Burton
(From OE-Core rev: c6f1010a47df33b40320aa5784181b659a3254d7) (From OE-Core rev: a043ec4fabad26861af83fdc54838544bb8bb3a8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehomeArmin Kuster
A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks: bitbake busybox -c menuconfig/devshell/devpyshell bitbake virtual/kernel -c menuconfig/devshell/devpyshell I got a error as follows: "Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)" Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker: http://bugs.python.org/issue8557 It could be fixed by using an absolute path instead per test. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05sdk: only install locales if we're using glibcRoss Burton
Using glibc-locale to install locales only makes sense if we're using glibc. (From OE-Core rev: 8fc80734053645fa893694dfe33ddaee99aa9a1a) (From OE-Core rev: 1ca33a798f5edf4bb1e695a79a46088dd23b6858) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for the getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05sdk: install specified locales into SDKRoss Burton
(From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) (From OE-Core rev: f223f90d07965eef8ddbb047abd1f75da99b1c08) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05package-manager: add install_glob()Ross Burton
(From OE-Core rev: 8d1b530c82de386d4183f5673c060b9d416a3835) (From OE-Core rev: b9a7821086b5165fda9f1c8a7c79a7997803f2a6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05package_manager: improve install_complementaryRoss Burton
- No need to use bb.utils.which() as subprocess will search $PATH - Clarity flow by moving the install inside the try/except (From OE-Core rev: f4d22b7195dd8f08fe26dd353c7e860208e87d6a) (From OE-Core rev: 1267df89164d7dcbbf77668ac49452bd0df87b54) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflict] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05package_manager: flush installed_pkgs file before oe-pkgdata-util uses itMartin Jansa
* since this commit: commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c Author: Ross Burton <ross.burton@intel.com> Date: Tue Apr 18 16:19:12 2017 +0100 package_manager: don't race on a file when installing complementary packages the file isn't closed before oe-pkgdata-util uses it and this temporary file might look empty to oe-pkgdata-util, because it wasn't flushed yet. Which resulted in almost empty debugfs tarballs and no locale packages in regular rootfs. * without this change: 124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz * with this change: 173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz (From OE-Core rev: 9b34200048b3d2b477a19b7ddc8d447f873adbb2) 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> (cherry picked from commit 877d38db08aa7060d16405443cf70539c559fe82) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05package_manager: don't race on a file when installing complementary packagesRoss Burton
PackageManager.install_complementary() uses WORKDIR/installed_pkgs.txt as a temporary file but if two tasks are executing for the same recipe which uses this file (e.g. bitbake my-image my-image:do_populate_sdk) then it's possible for the file to be overwritten or deleted. Instead of using a static filename, use tempfile to generate a unique name and ensure it is cleaned up when finished. Also move the glob generation/expansion earlier in the function as if there are no globs to install, we don't need to generate a package list. (From OE-Core rev: f5a1013ffa9815f22e13989e2bcb83f966e7ce2c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflicts] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie
repos don't conflict (From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8) (From OE-Core rev: a18942b0b3b848ccfa4bc50c56a565c279da9d74) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflicts] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05lib/oe/package_manager: bail if createrepo can't be foundRoss Burton
If createrepo isn't found then the errors later are mysterious, so explicitly check and error out early if it isn't there. (From OE-Core rev: e09636bbb3ea8ec58984197fd9c691bb908efe00) (From OE-Core rev: c87361fc886432a9db584712bf3e41ecd0541960) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflicts] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05package_manager: remove strings and migrate to direct arraysStephano Cetola
When using subprocess call and check_output, it is better to use arrays rather than strings when possible to avoid whitespace and quoting problems. [ YOCTO #9342 ] (From OE-Core rev: b12cec9a5ef14ecb02be7feec65508cf5d65c795) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05lib/oe/package_manager: .deb pre/postinst argsLinus Wallgren
The debian policy manual and MaintainerScripts wiki page states that the postinst script is supposed to be called with the `configure` argument at first install, likewise the preinst script is supposed to be called with the `install` argument on first install. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html https://wiki.debian.org/MaintainerScripts (From OE-Core rev: 3d9c3aae54589794ce3484fa1b21d1af2bd32661) Signed-off-by: Linus Wallgren <linus.wallgren@scypho.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file in the deploy directory warrants the complexity it brings elsewhere. Let's just remove it entirely. In particular, if two do_image_complete tasks run in parallel they risk both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time. Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file. In theory this should be safe because "cp -alf" will just cause one to overwrite the other. Unfortunately, coreutils cp also has a race[1] which means that if one copy creates the file at just the wrong point the other will fail with: cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to +‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680 (From OE-Core rev: 71e9e88847d7000781642ea6187ebd8f40dfdcfe) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27oe/path.py: fix for "Argument list too long"Robert Yang
Issue: LIN9-1648 Fixed when len(TMPDIR) = 410: $ bitbake core-image-sato-sdk [snip] Subprocess output: /bin/sh: /bin/cp: Argument list too long ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Function failed: do_rootfs [snip] This is because "copyhardlinktree(src, dst)" does "cp -afl src/* dst", while src/* is expanded to "src/file1 src/file2, src/file3..." which causes the "Argument list too long", use ./* as src and change cwd in subprocess.check_output() to fix the problem. (From OE-Core rev: a3dc93eb25fba32109edd1db6e8766074fb52e4b) 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>
2017-05-18rootfs.py: Respect OPKGLIBDIR variableMartin Jansa
* when OPKGLIBDIR doesn't have the default /var/lib value it will silently fail to copy package database from normal rootfs to debugfs rootfs and then when trying to install *-dbg complimentary packages it won't install anything, because installed_pkgs.txt file generated from debugfs is empty Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-05-18package_manager.py: respect OPKGLIBDIRMartin Jansa
* respect it for incremental rootfs generation * add lists_dir option to opkg.conf * also fix setting info_dir and status_file when they use default value, the problem is that self.opkg_dir is already prefixed with rootfs directory, comparing it with /var/lib/opkg always returned false and the options were appended to config file unnecessary * with opkg 0.3.4 we can use VARDIR prefix added in: commit d2a8e23dc669adc398f4bb8bcfcabfcf925708f7 Author: Florin Gherendi <floring2502@gmail.com> Date: Mon Dec 19 12:25:38 2016 +0200 libopkg: make the /var and /etc directories configurable at compile time. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-03-14lib/oe/gpg_sign: fix rpm signing with gpg > 2.1Markus Lehtonen
We need to check the gpg version and alter its command line options accordingly. [YOCTO #11054] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 44a44b7e582a5a654baf21829d168568481c13d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14lib/oe/gpg_sign: make gpg version a property of the signerMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit a00a362e3dc18ba04230cbbd6f91264e5d76f40d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14lib/oe/gpg_sign: sign rpm packages in chunks of 100Markus Lehtonen
Split the file list into chunks in order to avoid "OSError: [Errno 7] Argument list too long" This would happend when a package has huge amount of subpackages, e.g. glibc-locale. [YOCTO #11069] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 874f5016fd4dc76bc867b68470297fe59e78a9e6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11utils: Always use datastore's PATH for host_gcc_versionRoss Burton
BUILD_CC may reference something like ccache and expect this to come from ccache-native, we at least have some selftests which assume this. Modify the code to use PATH when runnig BUILD_CC to ensure the tests continue to work as expected. (From OE-Core rev: f3e753372baac43d0921186340cf260df056de20) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Hand applied and used d.getVar(True) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11uninative: rebuild uninative for gcc 4.8 and 4.9Ed Bartosh
Some c++ libraries fail to build if uninative is built with gcc 5.x and host gcc version is either 4.8 or 4.9. The issue should be solved by making separate uninative sstate directory structure sstate-cache/universal-<gcc version> for host gcc versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc is either 4.8 or 4.9 and it doesn't match gcc version used to build uninative. [YOCTO #10441] (From OE-Core rev: d36f41e5658bbbb6080ee833027879c119edf3e0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11lib/oe/rootfs: fix log_check warnings being printed twice with RPM packagingPaul Eggleton
We were calling _log_check() in the RPM-specific rootfs class as well as in the base class; this is unnecessary and resulted in any errors/warnings generated during the actual package installation time triggering two warnings instead of one. Drop the call from RpmRootfs._create() to fix this. (From OE-Core rev: 541c56d755ba0354297673e857628026ad9e4df2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11terminal.py: Pass string instead of bytes to ExecutionError to avoid exceptionMartin Vuille
Based on run() in bitbake/lib/bb/process.py, ExecutionError() expects strings not bytes. Passing bytes results in a "TypeError: Can't convert 'bytes' object to str implicitly" exception. Fixes Bug 10729 (From OE-Core rev: 063b63d4d324c23322ac1b6b7c7928e725d7b968) Signed-off-by: Martin Vuille <jpmv27@yahoo.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11lib/oe/qa: handle binaries with segments outside the first 4kbRoss Burton
The ELF parser was assuming that the segment tables are in the first 4kb of the binary. Whilst this generally appears to be the case, there have been instances where the segment table is elsewhere (offset 2MB, in this sample I have). Solve this problem by mmap()ing the file instead. Also clean up the code a little whilst chasing the problem. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2016-11-16package_manager.py: correctly remove all dependent packagesSamuli Piippo
Do not use --force-depends when trying to remove all dependent packages, as it removes only the selected package and not the dependent packages. (From OE-Core rev: a82e8725902086dab785a0b14305927dae1e4e8d) Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2016-11-16oe/copy_buildsystem.py: dereference symlinkRobert Yang
When there is a relative symlink in the layer, for example: symA -> ../out/of/layer/file symA will be invalid fater copied, it would be invalid from build time if it points to a relative path, and would be invalid after extracted the sdk if it points to a absolute py. Dereference symlink when copy will fix the problem. Use tar rather than shutil.copytree() to copy is because: 1) shutil.copytree(symlinks=Fasle) has bugs when dereference symlinks: https://bugs.python.org/issue21697 And Ubunutu 1404 doesn't upgrade python3 to fix the problem. 2) shutil.copytree(symlinks=False) raises errors when there is a invalid symlink, and tar just prints a warning, tar is preferred here since the real world is unpredicatable 3) tar is faster than shutil.copytree() as said by oe.path.copytree() So use tar to copy. (From OE-Core rev: f4d70bb0882eec4fb46cd942f2796fad57c72982) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2016-10-11lib/oe/qa: add ELF machine to string functionRoss Burton
Add a function (and test suite) to turn the ELF machine field (e_machine) into a string, so we can tell the user "x86-64" instead of 0x3E. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05package_manager.py: Allow multiple regexps in PACKAGE_EXCLUDE_COMPLEMENTARYPeter Kjellerstedt
The PACKAGE_EXCLUDE_COMPLEMENTARY variable can currently only contain one regular expression. This makes it hard to add to it from different configuration files and recipes. Allowing it to contain multiple, whitespace separated regular expressions should be backwards compatible as it is assumed that whitespace is not used in package names and thus is not used in any existing instances of the variable. After this change, the following three examples should be equivalent: PACKAGE_EXCLUDE_COMPLEMENTARY = "foo|bar" PACKAGE_EXCLUDE_COMPLEMENTARY = "foo bar" PACKAGE_EXCLUDE_COMPLEMENTARY = "foo" PACKAGE_EXCLUDE_COMPLEMENTARY += "bar" Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05package_manager.py: Allow a leading - in PACKAGE_EXCLUDE_COMPLEMENTARYPeter Kjellerstedt
This allows a regular expression specified in PACKAGE_EXCLUDE_COMPLEMENTARY to have a leading dash. Without this, the dash was treated by oe-pkgdata-util as the beginning of a command line argument. E.g., if PACKAGE_EXCLUDE_COMPLEMENTARY = "-foo$", it resulted in an error like: ERROR: <imagename>-1.0-r0 do_populate_sdk: Could not compute complementary packages list. Command '<topdir>/scripts/oe-pkgdata-util -p <builddir>/tmp/sysroots/<machine>/pkgdata glob <workdir>/installed_pkgs.txt *-dev *-dbg -x -foo$' returned 2: ERROR: argument -x/--exclude: expected one argument usage: oe-pkgdata-util glob [-h] [-x EXCLUDE] pkglistfile glob [glob ...] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23lib/oe/patch: improve accuracy of patch header extractionPaul Eggleton
When PATCHTOOL = "git", if we need to manually apply a patch and then commit it (i.e. when git am doesn't work) we try to extract the author / date / shortlog from the patch header. Make the following improvements to that extraction process: * If there's no explicit Subject: but the first line is followed by a blank line, isn't an Upstream-Status: or Index: marker and isn't too long, then assume it's good enough to be the shortlog. This avoids having too many patches with "Upgrade to version x.y" as the shortlog (since that is often when patches get added). * Add --follow to the command we use to find the commit that added the patch, so we mostly get the commit that added the patch rather than getting stuck on upgrade commits that last moved/renamed the patch * Populate the date from the commit that added the patch if we were able to get the author but not the date from the patch (otherwise you get today's date which is less useful). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23lib/oe/patch: exclude "From <hash>" from commit message when PATCHTOOL is "git"Paul Eggleton
If you leave "From <hash>" lines in the commit message it can actually break git rebase because it tries to interpret the line in the context of the current repository, and if the hash is invalid then a rebase will blow up with: fatal: git cat-file: could not get object info or in newer git versions: error: unable to find <hash> fatal: git cat-file <hash>: bad file (I hit this when I tried to do a devtool upgrade on openssl to 1.0.2i the first time I did "git rebase --skip") Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20package_manager.py: Change diagnostic messages per IRCMark Hatle
Based on a discussion with IRC user: Ulfalizer It was suggested that removing the diagnostic list, and replacing it with a simple hint to what might be causing the problem was a better solution. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-20package_manager.py: Adjust error message orderMark Hatle
Move the debug before the error (as it can take many pages.) This makes it much easier for the user to see the actual error message as it is still on the screen. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-19lib/oe/recipeutils: fix invalid character detection in validate_pn()Paul Eggleton
* validate_pn() is supposed to protect against invalid characters, fix the function so that it actually does (unanchored regex strikes again...) * However, now that the function is enforcing the restrictions, we do still want to allow + in recipe names (e.g. "gtk+") Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16package_manager.py: fix bitbake package-index failedHongxu Jia
Previously the following commit in oe-core move RPM metadata from DEPLOY_DIR to WORKDIR. ----------- commit a92c196449c516fe51786d429078bbb1213bb029 Author: Stephano Cetola <stephano.cetola@linux.intel.com> Date: Wed Aug 10 13:03:16 2016 -0700 Allow for simultaneous do_rootfs tasks with rpm Give each rootfs its own RPM channel to use. This puts the RPM metadata in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR where other tasks may race with it. ----------- In the modification of 'class RpmIndexer, it should not directly set arch_dir with WORKDIR. It caused 'bitbake package-index' could not work correctly. Assign WORKDIR as input parameter at RpmIndexer initial time could fix the issue. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-14lib/oe/copy_buildsystem: fix building eSDK with indirect paths in BBLAYERSPaul Eggleton
Indirect paths (e.g. ${TOPDIR}/../meta-something) do generally work if used in BBLAYERS in bblayers.conf. However, if you built an extensible SDK with this configuration then the creation of the workspace within the SDK using devtool in do_populate_sdk_ext failed. This is because the copy_buildsystem code was no longer correctly recognising that the core layer ("meta") was part of a repository (e.g. openembedded-core / poky) that should be shipped together - because of the indirection - and thus it was splitting out the meta directory, and a number of places in the code assume that the meta directory is next to the scripts directory. Use os.path.abspath() to flatten out any indirections. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14meta: cleanup d.getVar(var, 1)Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-08devtool: update-recipe: support files with subdir=Paul Eggleton
It's rare but there are recipes that have individual files (as opposed to archives) in SRC_URI using subdir= to put them under the source tree, the examples in OE-Core being bzip2 and openssl. This broke devtool update-recipe (and devtool finish) because the file wasn't unpacked into the oe-local-files directory and thus when it came time to update the recipe, the file was assumed to have been deleted by the user and thus the file was erroneously removed. Add logic to handle these properly so that this doesn't happen. (We still have another potential problem in that these files become part of the initial commit from upstream, which could be confusing because they didn't come from there - but that's a separate issue and not one that is trivially solved.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-08lib/oe/patch: handle non-UTF8 encoding when reading patchesPaul Eggleton
When extracting patches from a git repository with PATCHTOOL = "git" we cannot assume that all patches will be UTF-8 formatted, so as with other places in this module, try latin-1 if utf-8 fails. This fixes UnicodeDecodeError running devtool update-recipe or devtool finish on the openssl recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06oe.path: fix copyhardlinktree()Joshua Lock
The change to preserve extended attributes in copytree() and copyhardlinktree() (e591d69103a40ec4f76d1132a6039d9cb1555103) resulted in an incorrect cp invocation in copyhardlinktree() when the source directory contained hidden files. This was because the passed src was modified in place but some code paths expected it to remain unmodified from the passed value. Resolve the issue by constructing a new source string, rather than modifying the passed in string. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04image: Deploy images to IMGDEPLOYDIREd Bartosh
Changed deployment directory from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR to make sstate machinery to do final deployment and generate manifest. Renamed variable deploy_dir to deploy_dir_image in selftest code to avoid confusion with DEPLOYDIR variable. Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable as it's now used as a new deployment destination. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03lib/oe/patch: commit with a dummy user/email when PATCHTOOL=gitPaul Eggleton
When using PATCHTOOL = "git", the user of the system is not really the committer - it's the build system itself. Thus, specify "dummy" values for username and email instead of using the user's configured values. Various parts of the devtool code that need to make commits have also been updated to use the same logic. This allows PATCHTOOL = "git" and devtool to be used on systems where git user.name / user.email has not been set (on versions of git where it doesn't default a value under this circumstance). If you want to return to the old behaviour where the externally configured user name / email are used, set the following in your local.conf: PATCH_GIT_USER_NAME = "" PATCH_GIT_USER_EMAIL = "" Fixes [YOCTO #8703]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oe.path: preserve xattr in copytree() and copyhardlinktree()Joshua Lock
Pass appropriate options to tar invocations in copytree() and copyhardlinktree() to ensure that any extended attributes on the files are preserved during the copy. We have to drop the use cpio in "Copy-pass" mode in copyhardlinktree() because cpio doesn't support extended attributes on files. Instead we revert back to using cp with different patterns depending on whether or not the directory contains dot files. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-25rootfs.py: allow removal of unneeded packagesStephano Cetola
Current functionality allows for the removal of certain packages based on the read-only image feature. This patch extends this functionality by adding the FORCE_RO_REMOVE variable, which will remove these packages regardless of any image features. [ YOCTO #9491 ] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25license: simple verification of LICENSE_<pkg> valuesMarkus Lehtonen
LICENSE should be a superset of all LICENSE_<pkg> values. That is, LICENSE should contain all licenses and LICENSE_<pkg> can be used to "filter" this on a per-package basis. LICENSE_<pkg> shouldn't contain anything that isn't specified in LICENSE. This patch implements simple checking of LICENSE_<pkg> values. It does do not do advanced parsing/matching of license expressions, but, checks that all licenses mentioned in LICENSE_<pkg> are also specified in LICENSE. A warning is printed if problems are found. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-18devtool/recipetool/meta: Adapt to bitbake API changes for ↵Richard Purdie
multi-configuration builds Unfortunately to implenent multiconfig support in bitbake some APIs had to change. This updates code in OE to match the changes in bitbake. Its mostly periperhal changes around devtool/recipetool [Will need a bitbake version requirement bump which I'll make when merging] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17lib/oe/copy_buildsystem: fix merging sstate directories for eSDKPaul Eggleton
When we don't have uninative enabled there's more merging to be done in the default configuration (SDK_EXT_TYPE = "full" which by default means SDK_INCLUDE_TOOLCHAIN = "1") and there are likely files that already exist in the sstate feed we're assembling, so we need to take care to merge the directory contents rather than just moving the directories over. Additionally we now only run this if uninative genuinely isn't enabled (i.e. NATIVELSBSTRING is different to the fixed value of "universal".) In the process of fixing this I discovered an unusual behaviour in os.rename() - when we're merging these feeds we're dealing with hard-linked sstate artifacts, and whilst os.rename() is supposed to silently overwrite an existing destination (permissions allowing), if you have the source and destination as hardlinks to the same file then the os.rename() call will just silently fail. As a result the code now just checks if the destination exists and deletes the source if so (since we know it will be the same file, we don't need to check in this case.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-11Allow for simultaneous do_rootfs tasks with rpmStephano Cetola
Give each rootfs its own RPM channel to use. This puts the RPM metadata in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR where other tasks may race with it. This allows us to reduce the time that the rpm.lock is held to only the time needed to hardlink the RPMs, allowing the majority of the rootfs operation to run in parallel. Also, this fixes the smart tests by generating an index for all packages at the time of the test, rather than using the one provided by the rootfs process. Original credit for the enhancement should go to Steven Walter stevenrwalter@gmail.com. Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>