aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2012-11-29lib/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-11-29distro_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-11-29multilib - 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-11-29multilib: 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-11-29terminal: 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-11-29multilib/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-11-29lib/oe/packagedata: Use the PKGMLTRIPLETS variableRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-29lib/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-11-29insane: 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-11-29distrodata: 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>
2012-08-06buildhistory: correctly handle reductions of numeric fieldsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory_analysis: ignore removal of self-dependenciesPaul Eggleton
The recent removal of self-dependencies for dbg/dev packages produced a fair amount of noise, so filter it out since we know this is a reasonable change. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory_analysis: tidy up duplicate split_version functionPaul Eggleton
This function is now provided by bb.utils and since we have now bumped the minimum bitbake version, we can switch to that one instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06classes/buildhistory: record PKG/PKGE/PKGV/PKGRPaul Eggleton
Save PKG (the actual output package name, which is often different due to debian renaming), and PKGE/PKGV/PKGR (which may be manipulated in certain special cases e.g. gitpkgv.bbclass in meta-oe, the external-sourcery-toolchain recipe, etc.) Note that these are only written when they are different from the normal package name in the case of PKG, or PE/PV/PR for the other variables. Also, use PKGE/PKGV/PKGR instead of PE/PV/PR when comparing package versions since these actually represent the version that the package manager sees. Implements [YOCTO #2787]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06classes/buildhistory: save preinst/postinst/prerm/postrmPaul Eggleton
Write the value of these package script variables into the packageinfo so that any changes to them can be tracked (in separate files since they are multi-line). Inspired by an earlier patch from Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31lib/oe/lsb.py: Map unknown distributions to 'Unknown'Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-27lib/oe/lsb: Add basic LSB functionsRichard Purdie
This code was written by Christopher Larson <chris_larson@mentor.com> and allows generation of the LSB release data based upon the lsb_release command. It also includes a helper function to generate a string representing a given distribution. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-26meta/lib: remove test.pyPaul Eggleton
This looks like it was added by accident in OE-Core revision 7903433898b4683a1c09cc9a6a379421bc9bbd58. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18terminal.py: Fix Xfce on ubuntu/debian; some cleanupJeffrey C Honig
* Xfce class was setting and passing wrong variable for ubuntu/debian. * Xfce class was using -e instead of -x for passing command. The former creates a shell escape nightmare * Clean up local and instance/class variables with same name but different usage. * Remove side-effect and directly return formatted command for clarity. Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-17lib/oe/sstatesig.py: Exclude git-native from sstate checksumKhem Raj
gcc exposed this issue where cross gcc recipes were not having same task checksums as libgcc or gcc-runtime the target recipes which use same shared workdir and it was triggering the unpack fetch and patch tasks to reexecute and hence the trouble Now that we have more than 1 package to consider lets combine the check Thanks RP for help and this is on the line of patch 793ce6cd9aa632e0f13789c8293770a86085d28d Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09packagedata.py: Fix get_subpkgedata_fn for multilibMatthew McClintock
This happens when tryng to add libgcc-dev to as a multilib package (e.g. IMAGE_INSTALL_append = " lib32-libgcc-dev") | Processing task-core-boot... | Processing fman-ucode... | Processing dosfstools... | Processing lib32-libgcc-dev... | Unable to find package lib32-libgcc-dev (libgcc-dev)! NOTE: package fsl-image-full-1.0-r1.1.3.6: task do_rootfs: Failed RPM (or bitbake?) is looking in the tmp/pkgdata, however some of these file paths are mungned for the multilib scenario: $ find tmp/pkgdata/ | grep libgcc-dev$ tmp/pkgdata/ppce5500-fsl-linux/runtime/lib32-libgcc-dev tmp/pkgdata/ppc64e5500-fsl-linux/runtime/libgcc-dev This patch fixes where we look for these files so they can be found and properly installed for the multilib root file system Signed-off-by: Matthew McClintock <msm@freescale.com>
2012-07-05lib/oe/sstatesig.py: Exclude subversion-native from sstate checksumsRichard Purdie
If we don't do this, target and cross recipes end up with different sstate checksums for shared work directory tasks which is bad in the case of gcc. It leads to multiple fetch/unpack tasks against the shared directory which ends up with build failures/races. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30buildhistory_analysis: fix error when version specifier missingPaul Eggleton
Passing None to split_versions() will raise an exception, so check that the version is specified before passing it in. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30meta: replace os.system with subprocess.callRobert Yang
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25oe/process.py: remove it since it is unused and duplicatedRobert Yang
The meta/lib/oe/process.py is only used by oe_run and oe_popen in meta/classes/utils.bbclass, and they will be removed, we have a better one: bitbake/lib/bb/process.py, which can replace of it. [YOCTO #2489] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2012-05-17oe.types: give the regex type more sane semanticsChristopher Larson
Currently, if a variable is unset or has an empty value, the regex type will return a match object which always matches. Not all variable types will necessarily have the same behavior for handling defaults. I believe that returning a match object which matches nothing when a variable is unset is superior to returning one which matches anything, and the user can always explicitly request anything via '.*', if that's what they want. This constructs a null pattern object which will never match, and uses it when encountering an unset or empty variable (currently, these two things are one and the same, as maketype is handling the default. we may well want to shift that logic into the individual types, giving them more control over default behavior, but currently the behavior is at least relatively consistent -- no difference between unset and empty variables). Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2012-04-04license.py: fix behaviour of copyleft_complianceEric Bénard
actually if a package has a license in its LICENSE variable which is not in the whitelist nor in the blacklist and even if an other license in this variable is in the whitelist, the package gets excluded and is not taken in account in the copyleft_compliance. This patch solves this by excluding a recipe _only_ if the LICENSE variable includes a pattern from the blacklist and including a recipe only if it includes a variable from the whitelist _and_ none from the blacklist. Example in busybox which has LICENSE="GPLv2 & BSD-4-Clause", with the actual behaviour (where he blacklist contains only CLOSED Proprietary) we get : DEBUG: copyleft: busybox-1.19.4 is excluded: recipe has excluded licenses: BSD-4-Clause which is not sane because busybox is covered by a copyleft license which is GPLv2 and should match the default whitelist which is GPL* LGPL*. Signed-off-by: Eric Bénard <eric@eukrea.com>
2012-03-21buildhistory_analysis: avoid printing PE/PV/PR more than oncePaul Eggleton
Don't print PE/PV/PR changes as related field changes of related field changes (i.e. only print them once at the top level). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: report if all items removed from a listPaul Eggleton
If all items have been removed from a list then state that explicitly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: skip FILELIST changes for dbg packagesPaul Eggleton
Don't report when files are added or removed from dbg packages unless it results in the package being empty. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: hide version number increases in dependenciesPaul Eggleton
If an item in RDEPENDS or RRECOMMENDS only increases in its version number then don't report it as a change, since we don't care about it. This significantly reduces the noise after upgrades. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: use bb.utils.explode_dep_versionsPaul Eggleton
Previously this had its own implementation of splitting a list of packages with optional version e.g. "libncurses-dev (>= 5.9)"; switch to using the already existing bitbake function which does this as it is much better tested. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-19buildhistory_analysis: fix duplicate PE/PV/PR in related fieldsPaul Eggleton
Since PE, PV and PR appear in both the recipe history and package history files these were showing up twice when they were added as related fields to monitored changes. Only add them when the path is exactly the same. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-03-13path.py: add make_relative_symlink methodScott Garman
This method allows you to convert an absolute symlink into a relative one. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2012-03-08prservice: Added sanity check for prservice connection.Lianhao Lu
Fixed bug [YOCTO #2052]. Added sanity check for variables of PRSERV_HOST and PRSERV_PORT, also for the connection availabity of prservice. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02lib/oe/patch.py: Fix and improve PatchTree() resolver logicRichard Purdie
Currently, if PATCHRESOLVE is user and and PatchTree() is being used, you can get backtraces if patch application fails. This is because even in the failure case, self._current is incremented, meaning second time around, there are array range issues. This patch changes the code so _current is only incremented upon successful patch application, thereby resolving this failure. Secondly, if you bitbake -c patch -f a recipe using PatchTree(), the clean method was unimplemented leading to patch failures. The other part of this patch changes the logic so a series file and set of applied patches are maintained in a quilt like fashion. This means a the Clean method can be implemented correctly and rerunning the patch task of an existing patches source now works reliably. [YOCTO #2043 partially] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26sstatesig: add SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS option to exclude well ↵Martin Jansa
defined recipe->dependency Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>