aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
AgeCommit message (Collapse)Author
2015-09-19base.bbclass: Note when including pn with INCOMPATIBLE_LICENSESBeth Flanagan
We need to be able to tell people if we WHITELIST a recipe that contains an incompatible licese. Example: If we set WHITELIST_GPL-3.0 ?= "foo", foo will end up on an image even if GPL-3.0 is incompatible. This is the correct behaviour but there is nothing telling people that it is even happening. (From OE-Core rev: c9da529943b2f563b7b0aeb43576c13dd3b6f932) Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
2014-09-29base.bbclass: add SRCREV to do_fetch() hashRoss Burton
Without this changing just the SRCREV won't re-fetch unless you embed the SRCREV into PV. The downside here is that every hash changes, so this causes a full rebuild. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15multilib_global.bbclass: PREFERRED_PROVIDERS for multilibsPeter Seebach
The code in base.bbclass to spread PREFERRED_PROVIDERS values to multilibs doesn't work for things which rely on TARGET_PREFIX, such as virtual/${TARGET_PREFIX}gcc. This is because the expansion of TARGET_PREFIX produces the wrong value if executed prior to the assignment of TARGET_VENDOR_virtclass-multilib-libxx, which will always happen since that assignment doesn't happen until recipe parsing, but the PREFERRED_PROVIDERS expansion is happening around ConfigParsed. To solve this, we make a couple of changes. First, the creation of the TARGET_VENDOR override values is moved into a new ConfigParsed event handler in multilib_global. Second, the preferred_ml_updates() function's code is moved into that function too. It seems safe to assume that PREFERRED_PROVIDER values only need to be spread to other multilibs when multilibs are in use. I don't think this directly affects any use cases that don't involve third-party or alternative toolchains. Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11base.bbclass: Remove old-style definition of do_build() task.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19license.bbclass: canonicalise licenses when dealing with INCOMPATIBLE_LICENSERoss Burton
If INCOMPATIBLE_LICENSE=GPL-3.0 but the recipe sets LICENSE=GPLv3, the current code won't trigger because they're different strings. Fix this by attempting to canonicalise every license name to a SPDX name, so both names in this example become GPL-3.0. [ YOCTO #5622 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11classes/lib/oe: Fix cross/crosssdk referencesRichard Purdie
With the renaming of the cross packages, its no longer possible to use endswith("-cross") and similar to detect cross packages. Replace these references with other techniques. This resolves certain build from sstate failures which were due to the system believing cross packages were target packages and therefore dependency handling was altered. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-07base.bbclass: Fix multilib PREFERRED_VERSION handlingRichard Purdie
Now that gcc-cross, gcc-crosssdk and others have expanded variables in their names, the code that previous just applied to cross-canadian needs expanding to cover the other cases. Improve the conditional and also fix a bug where the multilib prefix wasn't being added into the generated versions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-01base.bbclass: Silence PREFERRED_PROVIDER warnings for sdk buildsRichard Purdie
Unfortunately expandKeys() notices overlap between the SDK and TARGET PREFERRED_PROVIDERS entries when we set things up for the SDK recipes. To avoid this, delete one of the sets of keys to avoid supurious warnings. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30base.bbclass: Update INCOMPATIBLE_LICENSE changes for gcc updatesRichard Purdie
Add in the TARGET_ARCH and SDK_ARCH suffixes from the gcc-cross changes. The -intermediate toolchain parts were canned a while ago so drop them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27base.bbclass: Merge two ConfigParsed event handlersRichard Purdie
There were two ConfigParsed event handlers in base.bbclass, this merges them together for small efficiency wins. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27base.bbclass: Run oe_import before other INHERITsRichard Purdie
Its possible for classes listed in INHERIT directives to use things like the oe.utils functions. If that happens the user sees a traceback since the modules don't become available until the ConfigParsed event. This change to use immediate expansion means that the oe modules become available much sooner and can be used in the core classes, including within base.bbclass. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05base: Show PRINC value in the warning messageMartin Jansa
* it's useful to know by how much we need to bump PR in original recipe to preserve upgrade path Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05base.bbclass: Deprecate the PRINC logicRichard Purdie
The PRINC logic is now deprecated, the PR server should be used to handle the automatic incrementing of the PR (package release) field. Add a warning message to alert users to the change. The functionality will be removed in the next release cycle. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28base: Remove pointless createCopy/update_data callsRichard Purdie
I was asked why we had these copy and update_data calls. I can offer no good explanation other than them perhaps once being needed for reasons long since forgotten and superceeded. With modern bitbake these should not be needed and shouldn't have been for a long time. Lets therefore remove them and simplify the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-13kernel.bbclass, base.bbclass: Fix support for old kernel configurationOtavio Salvador
This solves a regression introduced by OE-Core:9b75f6a (kernel: use oldnoconfig before yes '' | make oldconfig). The original oe_runmake explicitly calls 'die' command in case of failure so the fallback code never runs. The fallback code needs to handle the oe_runmake return code to call the backward compatible callback so we introduced a new command called oe_runmake_call which is used by oe_runmake. This does not change the functional behaviour of oe_runmake so it avoids any change except for the code which does need to handle the oe_runmake exit code. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-14base bbclass: add support for lz4 compressed archivesKoen Kooi
Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-06base.bbclass: pull in file-native for src.rpmChristopher Larson
Unpacking an src.rpm uses rpm2cpio.sh, which requires 'file'. Without this, builds of rpm on a host without 'file' installed will fail with very strange messages. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29base/gcc-common: Ensure umask setting is consistent for shared workdirRichard Purdie
gcc has cross and target components with a shared workdir. The unpack umask settings need to match for all of these. We need to use strings in each case to ensure the sstate code matches them correctly. This patch tweaks various things to ensure the change adding the unpack umask change doesn't break the compiler builds. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-27base.bbclass: Set umask 022 also for do_unpack taskMartin Jansa
* when git checkouts files from fetched clone it respects system umask and creates files with different permissions, if such files are copied to packages, resulting target images have also different permissions on them. * we need reproducible builds across different builders with different system umask, so set 022 umask [YOCTO #5590] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22base.bbclass: Fix incorrect setting of multilib PREFERRED_PROVIDER_virtual_pkgLei Liu
PREFERRED_PROVIDER_virtual_pkg has been incorrectly set with more than one multilib prefixes. For example, if we have two alternative multilibs lib64 and lib32, PREFERRED_PROVIDER_virtual_pkg will be set to lib32-lib64-pkg or lib64-lib32-pkg, depending on which multilib shows up first in the list. Signed-off-by: Lei Liu <lei.liu2@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-24base.bbclass: fix nondeterministic PACKAGECONFIG processing orderChristopher Larson
The PACKAGECONFIG flags were iterated over using dict.items(), but this returns the items in an undefined order. As this order determines the EXTRA_OECONF append order, we can get EXTRA_OECONF which are functionally equivalent, but whose contents differ, resulting in not using shared state archives we should be using. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01meta: Don't use deprecated bitbake APIRichard Purdie
These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13blacklist.bbclass: Avoid blacklist specific handle in base.bbclassOtavio Salvador
base.bbclass had code which handled the PNBLACKLIST in case of multilib use. This is better to be done in the blacklist.bbclass so it has all logic in a single place. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-05base.bbclass: Fix PACKAGECONFIG usage commentOtavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-20base.bbclass: Ensure finalised data is displayed in build bannerRichard Purdie
The build banner displayed at the start of builds can be misleading since the data store has not been finalised. As easy way to illustrate this is to use something like: DEFAULTTUNE = "i586" DEFAULTTUNE_<machineoverride> = "core2" and the banner will display the i586 tune yet the core2 tune will be used. We can avoid this if we finalise a copy of the data before displaying it. [YOCTO #4225] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14classes/conf: Add eventmasks for event handlersRichard Purdie
Now that bitbake supports masking events for event handlers, lets use this so event handlers are only called for events they care about. This lets us simplify the code indentation a bit at least as well as mildly improving the event handling performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07base/useradd/sstate: Ensure do_package setscene has correct fakeroot ↵Richard Purdie
dependencies The do_package_setscene task needs to depend on fakeroot in order to correctly install its files. We can whitelist the dependency in the sstate handling code for some performance improvements since we only need this if we're installing the package from sstate. Also use an append operator in base.bbclass for clarity. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09base.bbclass: Drop unused/obsolete importRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09clases/lib: Use modern exception syntaxRichard Purdie
Update older code to use modern exception handling syntax which is the form accepted by python 3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINEOtavio Salvador
The use of SOC_FAMILY here is old code and SOC_FAMILY is now implemented by MACHINEOVERRIDES behind the scenes. It therefore makes more sense to use the replacement value in this code. Just like SOC_FAMILY, this is a ":" delimited variable so we should iterate over the components, not use the value directly. Finally, MACHINEOVERRIDES contains MACHINE so we don't need to check that directly. This makes the functionality match what most users would expect it to do and is also compatible with the way things previously worked. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03base.bbclass: Update the preferred_ml_updatesMark Hatle
When processing the blacklists, we should avoid cross-canadian packages, as they will not have any multilib prefixes to expand. Similarly look for "virtual/nativesdk-" in addition to the existing "nativesdk-". These items should also be ignored. Finally, in order to avoid undeterministic variable key expansion, such as: MYVAR = "foo" PREFERRED_PROVIDER_${MYVAR} = "bar" PREFERRED_PROVIDER_foo = "foobar" during the multilib processing of PREFERRED_VERSION and PREFERRED_PROVIDER, the code was changed to rename the variable key, to the final key. This along with the existing code avoids the problems. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-03-28base.bbclass: When we use fakeroot, also use it for devshellRichard Purdie
Its generally useful for devshell to end up in the fakeroot environment. If a user needs to exit it, PSEUDO_UNLOAD=1 <command> works, its usually harder to enter the envionment. [YOCTO #3374] 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-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-11base.bbclass: Remove generate_git_config()Darren Hart
git no longer supports the use of GIT_CONFIG which defeats the purpose of GIT_CORE_CONFIG and the generate_git_config() function. Remove it. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08base.bbclass: remove redundant setting of MAKEBernhard Reutner-Fischer
oe_runmake() tried to set MAKE a second time, remove it since this is (nowadays?) redundant WRT the normal export MAKE= in the generated scripts. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-08base.bbclass: Commentary typo fixBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06package.bbclass: Multithread per file dependency generation codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25base.bblass : Add support for cmake to PACKAGECONFIG.Philip Balister
The cmake class uses EXTRA_OECMAKE to adjust the cmake configuration. This patch adds support for this, if the cmake class is used by the recipe. Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24base: make feature backfilling happen earlierRichard Purdie
Backfilling DISTRO_FEATURES and MACHINE_FEATURES with _append statements happens too late to use those variables with conditional inherits, like this: inherit ${@base_contains('DISTRO_FEATURES','sysvinit','update-rc.d_real','',d)} Instead, do the backfilling at ConfigParse time so that it happens earlier in the parse, which results in that inherit behaving as expected when sysvinit was backfilled. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18base.bbclass: improve the incompatible license logic a bitChristopher Larson
Handle the potential case where the recipe level LICENSE contains an incompatible license, but all of its emitted packages are in fact compatible. Without this adjustment, it would skip such a recipe. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18base.bbclass: use debug messages for INCOMPATIBLE_LICENSEChristopher Larson
Spamming potentially over a screenful of messages due to their INCOMPATIBLE_LICENSE selection seems a bit unnecessary. If the distro was configured that way, the user likely won't care, and if the user set it, they likely know the implications, so make the messages debug instead. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEsAndy Ross
Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of incompatible license strings and/or glob patterns. Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3 and LGPLv3), but this was broken because of a bug in return_spdx() which would die with a runtime error when there was no SPDXLICENSEMAP entry for the string. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-07base.bbclass: Remove implicit dependency on license.bbclassRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26base.bbclass: Drop P and PN from FILESPATHRichard Purdie
In the interests of simplifying things, remove P and PN from FILESPATH, instead relying on the BP and BPN versions which work in 99% of cases. In any problematic case such as a -native only recipe, either the patch directory can be renamed or the recipe can set FILESPATH specifically. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26bitbake.conf: Simplify FILESPATHRichard Purdie
Files are very rarely, if ever placed in ${PF}. If a recipe needs to do this, it can easily append to FILESPATH so it makes sense to drop this from the default search path. Equally, using FILE_DIR as part of the search path leads to 'bad' SRC_URI entries and/or file layouts which are not preferred. I'm therefore of the opinion we should also remove this from FILESPATH and encourage people to cleanup any places this breaks my correcting the layouts to match the standard or worst case adding to FILESPATH in recipes that need it. These changes work towards making the system more friendly as users won't be greeted with huge search paths we rearely use making the "correct" layout more obvious. 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-22base.bbclass: Add PKGTRIPLETS and PKGMLTRIPLETS variablesRichard Purdie
These variables correspond to the PACKAGE_ARCH list combined with the TARGET_VENDOR and TARGET_OS values. These can be used to traverse the pkgdata structure. Setting these once in base.bbclass stops pkgdata needing to recalculate the values and is also useful for the reworked shlibs code in a patch that will follow this. 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>