aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2013-12-03lib/oe/path: Fix copytree functions for tar 1.27Richard Purdie
tar version 1.27 returns: tar: --same-order option cannot be used with -c with the commandlines we have been using. We can remove the -s option (which is --same-order) to remove the error. (From OE-Core master rev: 69c26e795c117aabfaf313abbfd10e70ede633d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-07lib/oe/terminal.py: add support for MATE desktop terminalsAndre McCurdy
A simple clone of the corresponding Gnome class. Without this, devshell fails completely on a default installation of MATE desktop Linux Mint 15. (From OE-Core master rev: 8cc078a9c679845464c59028f584d7aba098cc1f) Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-07TmuxRunning: handle multi-word commandsTyler Hall
Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single argument for its command. This applies to the "split-window" command as well as "new." Note that this alone is not enough to fix the TmuxRunning devshell when using pseudo because tmux does not preserve the environment that pseudo requires. (From OE-Core master rev: 36fb9799d6a449d86acca3be354af56ad87c3151) Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-08path.py: Deal with race issueRichard Purdie
The change to use copyhardlinktree in some of the sstate code instead of copytree exposed a race condition. This is due to cp failing if it finds a directory doesn't exist yet some other process creates it while cp was trying to create it itself. tar doesn't error in this case. To fix this we need to create the directory structure with tar, then use cp to hardlink the files. Messy but probably worth doing. I also took the opportunity to remove src_bak since the code is neater without it. (From OE-Core master rev: 2f954a9a6932f1e6c564e7e7aacaac628a75eed7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-08sstate.bbclass: make hard links for staging filesRobert Yang
Make hard links for staging files instead of copy to save the disk space (3G will be saved for a core-image-sato build), and it doesn't affect much on the build time. The following directories are affected: 1) The sysroot 2) The DEPLOY_DIR 3) The pkgdata [YOCTO #4372] (From OE-Core master rev: 5853e0f482b22258c909268fe71673a29e31989b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15oe.terminal: add tmux classesChristopher Larson
This adds two new Terminal classes. It's separated into two, so that opening a split inside a tmux window is preferred to the other terminal types, but opening a tmux session is prioritized only slightly higher than screen. - tmuxrunning: Open a new pane in the current running tmux window. Requires that the TMUX variable be added to the env whitelist to use it. - tmux: Open a new tmux session Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05lib/oe/classextend.py: avoid extending any kernel packagePaul Eggleton
For multilib and other uses of classextend, we don't want any dependencies on kernel packages to be extended since there should only be one kernel variant. Fixes [YOCTO #2918] (where kernel-dev was being extended.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04utils: add helper to get all non-system packagesRoss Burton
For example if PACKAGES is "foo foo-data foo-dev foo-doc", this will return "foo-data". Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04oe.terminal: add tmux classesChristopher Larson
This adds two new Terminal classes. It's separated into two, so that opening a split inside a tmux window is preferred to the other terminal types, but opening a tmux session is prioritized only slightly higher than screen. - tmuxrunning: Open a new pane in the current running tmux window. Requires that the TMUX variable be added to the env whitelist to use it. - tmux: Open a new tmux session Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29meta/lib/oe/lsb.py: extract only the needed info from lsb-releaseCristian Iorga
Instead of running lsb_release -a, a lsb_release -ir will be run. This will prevent issue with distros that don't have all the needed info in /etc/lsb-release file, in which case lsb_release won't generate an error code. Partial fix for [YOCTO #4071] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29meta/lib/oe/lsb.py: fix data extraction from /etc/lsb-releaseCristian Iorga
In some cases, /etc/lsb-release file is used to extract info about poky build host machine. But the strings are not stripped of end of line special characters. As such, when this info is concatenated and used as a directory entry in sstate_cache, this is an issue. Usually, this issue is masked by the fact that distro related info is extracted from the output of lsb_release command. In case of Yocto Linux, running "lsb_release -a" will give an error code because CODENAME info is not present. As such, bitbake will extract the info from /etc/lsb-release, running into the above issue. Consequence is that building under BA will crash. Partial fix for [YOCTO #4071] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18package: Add cachedpath optimisationRichard Purdie
Currently, various standard library operations like os.walk(), os.path.isdir() and os.path.islink() each call stat or lstat which involves a syscall into the kernel. There is no caching since they could conceivably have changed on disk. The result is that for something like the do_package task of the kernel we're spending over two minutes making 868,000 individual stat calls for 23,000 files. This is suboptimal. This patch adds lib/oe/cachedpath.py which are a set of replacement functions for these operations which use cached stat data rather than hitting the kernel each time. It gives a nice performance improvement halving the build time of the kernel do_package. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-12lib/oe/lsb: enable getting distro ID when lsb_release is not installedPaul Eggleton
If lsb_release is not installed (as it may not be on headless/minimal installations on distros whose LSB package has a long list of dependencies) we need to gather the information directly from files in /etc. Fixes [YOCTO #4012]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-09base.bbclass: don't backfill features that already existRoss Burton
It's too easy to cause rebuilds because the DISTRO_FEATURES have changed in meaningless ways (such as re-ordering or duplicate items). Help stop this by checking if the feature to be back-filled is already present. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12distro_check: Remove creation of empty Meego filelist.Anders Roxell
This fixes permissions errors when running distrodata. Signed-off-by: Anders Roxell <anders.roxell@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-11lib/oe/path.py: support missing directory components in realpath()Enrico Scholz
Some use cases in OE operate on symlinks which dangling path components. Assume that these are directories instead of raising ENOENT. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11lib: implemented oe.path.realpath()Enrico Scholz
Various parts of the buildsystem have to work with symlinks. Resolving them is not trivial because they are always relative to a sysroot directory. Patch adds a function which returns the destination of a symlink by assuming a given path as the / toplevel directory. A testsuite was added too. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11buildhistory_analysis: handle more R* variablesPaul Eggleton
Report changes to RPROVIDES, RREPLACES, and RCONFLICTS. As RSUGGESTS isn't widely used and isn't of huge concern if it changes, it is not reported by default. Implements [YOCTO #3391]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package: Process package stripping in parallelRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Multithread per file dependency generation codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06sstate/path.py: Add copyhardlinktree() function and use for performance ↵Richard Purdie
optimisation Add a function which copys a tree as a set of hardlinks to the original files, then use this in sstate to reduce some of the overhead of sstate package creation since the file isn't actually copied. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06classextend.py: use explode_dep_versions2 in order to preserve versions tooConstantin Musca
Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-01multilib: skip packages that provide virtual/kernelBruce Ashfield
Rather than keying on recipes that inherit kernel.bbclass, we should be checking for providers of virtual/kernel when skipping kernel recipes in multlib builds. Not all providers of virtual/kernel inherit kernel.bbclass (notably linux-dummy), so checking on the provider is a more complete check. We need to be sure to check for inheritance of module-base as well, this allows for packages that provides modules to avoid the multilib renaming. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25prservice.py: fix NameError: global name 'host' is not definedMartin Jansa
* http://git.openembedded.org/openembedded-core/commit/?id=e00f49de8b1f79c3e07b887d257bd75a46052fa0 removed host and port variables Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25prserv: change PRSERV_HOST semanticsConstantin Musca
- remove PRSERV_PORT variable - use 'hostname:port' as PRSERV_HOST format - remove USE_PR_SERV variable - one can activate PRS by setting PRSERV_HOST [YOCTO #3744] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14lib/oe/patch: Use force option when creating symlinks to patchesRichard Purdie
Under the scenario where you have an existing source tree and you then change one of the patches, maybe to be architecture or machine specific, then rebuild, the build will fail since the symlink already exists but should now point at a different file. The easiest fix is to tell the system to remove and recreate the link which is done with the force option. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-06buildhistory_analysis: fix broken list length checksPaul Eggleton
Fix erroneous use of .count instead of len(), which unfortunately is not reported by Python as an error in a numeric comparison. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06qa.py: Toolchain path should not be hardcoded to execute objdumpMuhammad Shakeel
Currently objdump command is invoked from the STAGING_BINDIR_TOOLCHAIN directory. In case of external toolchain if this directory doesn't exist then objdump fails to execute. Instead of hardcoding the path it should search PATH to find it. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-05meta/lib/oe/sstatesig: fix locating stamp filesPaul Eggleton
Fixes "bitbake-diffsigs -t" for changes to the stamp directory layout, and this time uses the actual value of STAMP to get the location of sigdata files in the stamp directory rather than trying to do it manually, which should be a little more robust. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04qa.py: Modify the env for the child process onlyMuhammad Shakeel
Modified environment is only required for new subprocess to execute objdump command and not for the current process. We should only modify the copy of env to pass it on to the child. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-06lib/oe/classextend: Ensure we don't extend expressions more than onceRichard Purdie
We could end up with MLPREFIX being prepended to variables like PACKAGE_DYNAMIC. This patch avoids the problem and unbreaks builds. [YOCTO #3389] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27distro_identifier: replace slash with hyphenMihai Lindner
Use "-" instead of "/" in "n/a" strings ("Distributor ID" and/or "Release"), provided by `lsb_release`. This leads to directories and subdirectories created in ./sstate-cache/ e.g. Distro-n/a/ where "Distro-n" is dir and "a" is subdir. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-26multilib - crosssdk: Stop building multilib for crosssdk packagesMark Hatle
Crosssdk packages are not actually multilib packages, so treat them the same as other nativesdk packages in the multilib, base, and classextend components. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-26multilib: Add support for cross-canadian multilib packagesMark Hatle
Add support for the generation of cross-canadian packages. Each cross-canadian package has: PN = "pkg-cross-canadian-${TRANSLATED_TARGET_ARCH}" in order for that to be evaluated properly with multilibs enabled, it was necessary to detect both the presence of the cross-canadian packages and then update the vars using the OVERRIDE for the multilib. Additional checks were made to ensure that any dependency that sais "cross-canadian" did not get prefixed with the MLPREFIX. Also, make sure that even when building multilib cross-canadian packages, we only use the single SDK PACKAGE_ARCH, we don't want or need variants. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-24terminal: Add support for running custom terminals.Morten Minde Neergaard
Example config: OE_TERMINAL = "custom" OE_TERMINAL_CUSTOMCMD = "mysuperterm" Signed-off-by: Morten Minde Neergaard <mneergaa@cisco.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-22multilib/clsextend: Improve handling of regexps in PACKAGES_DYNAMICRichard Purdie
Now that PACKAGES_DYNAMIC is more standardised, starting with ^ anchors, the variable manipulations performed by clsextend for multilib don't work. This patch at least improves it to hack around the problem and enable mulitlib builds to work again. If this code doesn't do the right thing, the recipe is free to override the variable with the correct multilib case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22lib/oe/packagedata: Use the PKGMLTRIPLETS variableRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18lib/oe/qa: Trap exceptions when running objdumpPhil Blundell
This avoids propagating a failure if we encounter an ELF file that objdump can't parse for any reason. Some versions and/or configurations of objdump will refuse to read files for "the wrong" architecture. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18insane: Rationalise phdrs-based QA checksPhil Blundell
Various different QA checks are based on essentially the same data from the ELF program headers. Calling objdump to extract it repeatedly is inefficient, particularly if the shell is involved. Instead, let's cache the output from objdump inside the qa.elf object and allow it to be reused by multiple tests. Also, using objdump instead of scanelf to check for bad RPATHs (in the same way that the useless-rpaths check was doing already) allows the dependency on pax-utils-native to be dropped. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-03distrodata: Update distrocheck functionsSaul Wold
Fix the distro check functions for the change of nativesdk being a suffix to a prefix. Also added crosssdk as another case for converting to PN for matching in the distro_tracking Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03buildhistory_analysis: update to use explode_dep_versions2()Paul Eggleton
Handle where multiple version specifications are present for the same dependency. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26packagedata/multilib: Fix search patch for multilib buildsRichard Purdie
The current multilib search path code for packagedata is flawed since it doesn't correctly handle changes in the TARGET_VENDOR/TARGET_OS that multilib may make. This patch enhances the code to correctly build the search paths so multilib packagedata is found correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24terminal: Send LogExecTTY event to spawn screenJason Wessel
Bitbake has the ability to request to run a command and if it is not possible fall back to emitting a log message. This can be used to start a screen client automatically on the controling tty if the UI has an interactive tty. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24terminal: pass data store all the way through to terminal classJason Wessel
Passing the data store will be needed for firing a custom event for the screen class. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10lib/oe/sstatesig.py: add signature data query functionPaul Eggleton
Add a function that can be used from BitBake code which will find signature data (sigdata/siginfo) files based on specified criteria, and hook it into BitBake as bb.siggen.find_siginfo. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-31nativesdk: Switch to using nativesdk as a prefix, not a suffixRichard Purdie
As discussed on the mailing lists, using a suffix to package names is hard and has lead to many recipes having to do PKGSUFFIX games. Its looking extremely hard to scale nativesdk much further without hacking many recipes. By comparison, using a prefix like multilib does works much better and doesn't involve "hacking" as many recipes. This change converts nativesdk to use a prefix using the existing multilib infrastructure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-31nativesdk: Convert to use classextend.pyRichard Purdie
This patch converts the nativesdk class itself from operating as a suffix to a prefix (see the proceeding patch for the related changes outside this class). The big benefit here is that we can reuse the generic class extension code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25terminal.py: use unique ids for screen sessionsJason Wessel
When running multiple sets of builds on the same system, it is hard to distinguish which build belongs to which screen session and you can end up resuming the wrong session. The simple solution is to just append the process id to the screen session invocation to make each unique. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-17utils.py: Modify and rename distro_features_backfill python functionAndrei Gherzan
This function was written to be used with DISTRO_FEATURES. This behavior is usefull with MACHINE_FEATURES as well. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-06buildhistory: reduce the numeric delta to 10%Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>