Commit Graph

266 Commits

Author SHA1 Message Date
Richard Purdie 554c892ccf meta: Don't use deprecated bitbake API
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.

(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01 15:51:42 +01:00
Otavio Salvador 9bb0b1c285 blacklist.bbclass: Avoid blacklist specific handle in base.bbclass
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.

(From OE-Core rev: 04f0fefeccc1e7e3af8a1f741350492ae3f171fc)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13 23:06:03 +01:00
Otavio Salvador de17b597fa base.bbclass: Fix PACKAGECONFIG usage comment
(From OE-Core rev: eb54badb971eff34dcbf8c111bf1ab9deae3a149)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:59 +01:00
Richard Purdie 17b1507c02 base.bbclass: Ensure finalised data is displayed in build banner
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]

(From OE-Core rev: bdce39f22a0e8c8e1cf237322657220e4201077d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 09:19:27 +01:00
Richard Purdie 53841ce521 classes/conf: Add eventmasks for event handlers
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.

(From OE-Core rev: bff73743280f9eafebe4591f7368ead91a4eb74d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:55:47 +01:00
Richard Purdie 7bf5c38e0f base/useradd/sstate: Ensure do_package setscene has correct fakeroot 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.

(From OE-Core rev: 0810ea2a72bdea67a3d8002c4e12fb20f45cf1d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 17:52:08 +01:00
Richard Purdie 8aa498d895 base.bbclass: Drop unused/obsolete import
(From OE-Core rev: e501a98e87b8854040ac4081326871d7d6397917)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 2ac4f8b397 clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which
is the form accepted by python 3.

(From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Otavio Salvador 9bb5eb86c1 base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINE
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.

(From OE-Core rev: 8ceef74dd4f662b4c7e3c170ce486e966ebebeff)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:19:43 +01:00
Mark Hatle 805eede157 base.bbclass: Update the preferred_ml_updates
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.

(From OE-Core rev: 1416613e94af46c6e74532bca0f026d1540becbb)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:12 +01:00
Richard Purdie 4dc31a327b base.bbclass: When we use fakeroot, also use it for devshell
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]

(From OE-Core rev: e6ffc747a8ca5142c9bc6fbd2b06b5808bb38b02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-28 13:27:17 +00:00
Richard Purdie add11fa1ab package: Add cachedpath optimisation
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.

(From OE-Core rev: 556dee0c4d6d8a87c0cddbd2f60fe5917d009f18)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 21:26:40 +00:00
Ross Burton 0aad8decf0 base.bbclass: don't backfill features that already exist
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.

(From OE-Core rev: 63c7192119d54b92d908441109ed4e4fff761cba)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:52 +00:00
Darren Hart c7c9f6c1fc base.bbclass: Remove generate_git_config()
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.

(From OE-Core rev: c485322fa2b89eb90efd88969d0c73575f128af7)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:54:03 +00:00
Bernhard Reutner-Fischer 81117fd2fa base.bbclass: remove redundant setting of MAKE
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.

(From OE-Core rev: b9c83b22b555349314191ba60346b01a9252a812)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:35 +00:00
Bernhard Reutner-Fischer 736383a6be base.bbclass: Commentary typo fix
(From OE-Core rev: 3f0c1f6f001bbe958a0589da7db52f96a2d9d369)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:35 +00:00
Richard Purdie d81aa06ece package.bbclass: Multithread per file dependency generation code
(From OE-Core rev: b659eb0f2070149d9516c129b3853b41fbbd1033)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Philip Balister a25f99bc9b base.bblass : Add support for cmake to PACKAGECONFIG.
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.

(From OE-Core rev: d8c0ce5a4a27c8aa1d07fc15d6e000af725a51e6)

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:43 +00:00
Richard Purdie 4db8a3daaf base: make feature backfilling happen earlier
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.

(From OE-Core rev: 22429cdf79ed952072707a929643c7386fa7e056)

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-24 20:08:59 +00:00
Christopher Larson aac03657ee base.bbclass: improve the incompatible license logic a bit
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.

(From OE-Core rev: 9256361cf2e929004dcc5615b21fe3c46d9f7740)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:06 +00:00
Christopher Larson d597053ce2 base.bbclass: use debug messages for INCOMPATIBLE_LICENSE
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.

(From OE-Core rev: 72f47df32dce91e3364e3837e2c47bdd2d632571)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:06 +00:00
Andy Ross ec17940f72 base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
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.

(From OE-Core rev: 8a8d00f4c9f7fe5f9f173b43b86cd18a6c75435c)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:54:36 +00:00
Richard Purdie e3532498df base.bbclass: Remove implicit dependency on license.bbclass
(From OE-Core rev: 28c06a32201351894546b3095f80daa84acf7b39)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:35:40 +00:00
Richard Purdie e8be466431 base.bbclass: Drop P and PN from FILESPATH
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.

(From OE-Core rev: fb359583b659cda643973fa285002aaffb729a51)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:23 +00:00
Richard Purdie 65145901af bitbake.conf: Simplify FILESPATH
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.

(From OE-Core rev: 3efa13cd76bbd5611805021945fc9def88d9fd93)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:23 +00:00
Mark Hatle 7e2ff7c012 multilib - crosssdk: Stop building multilib for crosssdk packages
Crosssdk packages are not actually multilib packages, so treat them
the same as other nativesdk packages in the multilib, base, and
classextend components.

(From OE-Core rev: 15834451525453e0f7ceac25d4f98117f1825f37)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:55 +01:00
Mark Hatle ea22010560 multilib: Add support for cross-canadian multilib packages
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.

(From OE-Core rev: 132a182e2f6c330aa645de42c1aeb386e43bddd3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:54 +01:00
Richard Purdie 0c2c3b7656 base.bbclass: Add PKGTRIPLETS and PKGMLTRIPLETS variables
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.

(From OE-Core rev: f91322edc8b9f2a5906f3908bde2508ae97f2816)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22 09:47:46 +01:00
Richard Purdie ad23395cd1 nativesdk: Switch to using nativesdk as a prefix, not a suffix
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.

(From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07:00
Richard Purdie 48619958d5 meta/classes: Various python whitespace fixes
It was pointed out we have a number of weird indentations in the python functions.
This patch cleans up 3, 7 and other weird indentations for the core bbclass files.

It also fixes some wierd (odd) shell function indentation which my searches picked up.

(From OE-Core rev: 8385d6d74624000d68814f4e3266d47bc8885942)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21 12:15:30 +01:00
Yao Zhao 771f89498c base.bbclass: fix PACKAGECONFIG handling code
PACKAGECONFIG flag code only handles that when it has 3 or 4 items in flag,
it may have a stale data if some flags doesn't need DEPENDS and RDEPENDS.

(From OE-Core rev: 884cab0428cff2ffd070b6f36b688ca9851fbe43)

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-19 10:45:55 +01:00
Peter Seebach e2f73517ae base.bbclass: Work even when there's no PNBLACKLIST entries
It turns out that the result of getVarFlags is not a list, it's
a dict. So "getVarFlags(...) or []" does not reliably produce
something with a .items. This escaped detection because our
local build environment never ends up running builds without
PNBLACKLIST entries.

(From OE-Core rev: 491df239170dd20f3e91df6bc1ead2945a78e075)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 11:33:20 +01:00
Peter Seebach 13e2effd62 base.bbclass: Expand PNBLACKLIST across multilibs too
The PNBLACKLIST feature does not currently work with multilibs,
because they have different ${PN}. The obvious thing to do is to
do this at the same point that we do the PREFERRED_PROVIDER
and PREFERRED_VERSION fixups. (Making the PNBLACKLIST check
do the for-each-multilib check requires it to do the multilib
list generation repeatedly.)

(From OE-Core rev: 9bc0ca9369d0daee94abf60d3d521cc734c7e8cd)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-15 14:26:40 +01:00
Christopher Larson 096306ecd1 base.bbclass: allow specifying an lsb distro hook via the metadata
This is useful when you have a rather large set of compatible distros. For
example: Centos 5.4, 5.5, 5.6, etc, RHEL server 5.x, RHEL workstation 5.x.

(From OE-Core rev: 0e9932b2dba8573736c92bd07e59bad21b9fda2d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-15 14:26:37 +01:00
Richard Purdie 10b5ea77b1 base.bbclass: Set the NATIVELSBSTRING variable to represent the distro we're running on
This can then be used by the sstate code to mark native and cross packages
as being specific to a given distro.

(From OE-Core rev: 8556eb98be8bd9f02ee11a0d8a889c1895c86460)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-28 09:20:52 +01:00
Richard Purdie 5157c85776 base/perlnative/pythonnative/gzipnative: Add a new variable to enable easier handling of native path issues
If something is listed in ASSUME_PROVIDED but also manually built (like bzip2-native and
bzip2-replacement-native), we need to ensure that the installed binaries are only accessed
for things which list the provider in DEPENDS.

This patch adds a generic mechanism to handle this instead of everything reinventing the
wheel. EXTRANATIVEPATH += "perl-native" will ensure that ${STAGING_BINDIR_NATIVE}/perl-native
is added to PATH.

This means that:

a) Such providers should install to ${bindir}/xxx-native
b) Should PROVIDE += "xxxx-replacement-native"
c) That users should DEPEND on xxx-replacement-native and have EXTRANATIVEPATH += "xxx-native"

This patch enables this at the core level, the bzip2 recipe still needs adjusting to work
like this along with adjustment of the users of bzip2-replacement-native (python-native?).

(From OE-Core rev: 14b70cd222519e5bccaca955334787f123d9fc54)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:56:20 +01:00
Richard Purdie 73cf0335c4 Remove a number of unneeded import os/bb calls
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.

(From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 12:24:50 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Ross Burton f22424000f base.bbclass: add GNUmakefile to the list of possible makefile names
(From OE-Core rev: b753eab1028ba48dfdcdeefa07f3f30743f3ee45)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:53:57 +01:00
Mark Hatle 8c87f255c0 base.bbclass: Add cross-canadian-${TRANSLATED_TARGET_ARCH} to the license exclusion list
This appears to be an oversight in the original implementation.  All of the
host package types were being ignored except for the SDK cross-canadian type.

(From OE-Core rev: 750f99d4e2c805985cd87a2358b0625a808ecf4d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:55:00 +01:00
Richard Purdie 0299499770 ccache: Separate out into its own class
Currently, ccache is used if it is present. When building from scratch it gives
no performance improvement and creates a ton of empty directories even when its
not in use.

This change moves ccache support to a bbclass file which the user can choose to
enable. This should make builds more determinstic and make it easier/clearer
to the end user when its being used and when it is not.

(From OE-Core rev: 2acf8da4f13c175ea818b9514677b7059de1e3e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:49 +01:00
Paul Eggleton 66b0eceeca classes/base: add checksum file list at parse time
Connect the new fetcher file checksum code so that we get a list of the
files to be checksummed at parse time.

The file-checksums flag will not be read unless we are using a version
of BitBake that supports the function we call within it, so it is safe
to include this change even when the metadata will still be used with
older versions of BitBake.

Implements [YOCTO #2044].

(From OE-Core rev: f26065629b6397d129db930268b72164f8e5d3e4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:37 +01:00
Christopher Larson df914695b5 base.bbclass: use isinstance for base_eventhandler
(From OE-Core rev: 86556a2bfa23ba69fea2ade14599054b186150cd)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-03 15:48:02 +01:00
Christopher Larson 5d540ca314 bitbake.conf: shift build config summary control to here
(From OE-Core rev: 164df0708d9add81be7d1fd56d487253062756d8)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-03 15:48:01 +01:00
Richard Purdie 71b78f0483 classes: Add recipe class to overrides
We have currently no override to detect a recipe being build cross, crosssdk
or for target at times we can use virtclass-native and virtclass-nativesdk to
override stuff in recipes but we dont have way to modify a variables
based on recipe type always.

This patch adds in such an override and in particular makes a target override
class available.

With this change now we can say:

EXTRA_OECONF_class-target = "...."
EXTRA_OECONF_class-native = "..."
EXTRA_OECONF_class-nativesdk = "..."
EXTRA_OECONF_class-crosssdk= "..."

Based of an original patch by Khem Raj

(From OE-Core rev: cf332fd9bf685f6d42b11c1f0c37b934c7f5bcbe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-30 11:37:22 +01:00
Richard Purdie b4acabea99 base.bbclass: Fix PACKAGECONFIG issues with native and nativesdk BBCLASSEXTEND recipes (and multilib)
This patch fixes up the issues that were being seen where BBCLASSEXTEND and
PACKAGECONFIG were interacting badly. It also ensures PACKAGECONFIG interacts
properly with multilib builds.

Ideally some of this code will be abstracted into lib/oe/classextend.py but
at this point in release more invasive changes like this are inappropriate.

This patch also removed empty strings from expressions rather than
passing them around as this was complicating the additional code
unnecessarily.

The patch was verified against the OE-Core metadata where the return values of
expandFilter() were sanity checked by hand for native/nativesdk and
multilib combinations.

[YOCTO #2225]

(From OE-Core rev: 46db11c4a789034b7040faf127ab865148bedad8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 13:49:35 +01:00
Elizabeth Flanagan bdf2d94c35 INCOMPATIBLE_LICENSE: support for spdx and pkg licenses
This adds a few things to the incompatible license functionality

1. INCOMPATIBLE_LICENSE was unable to distinguish any variation
within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the
SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE

2. Given a recipe where the main LICENSE was incompatible but
a package of the recipe was compatible, the entire recipe would
be excluded. This allows us some finer grained control over what
exactly gets excluded.

(From OE-Core rev: a8d7246f7b13ef2636c325263c8bfa22552d7a57)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:38 +01:00
Richard Purdie a8dc76ee69 base.bbclass: Fix PACKAGECONFIG handling when no flags are set
When the main PACKAGECONFIG variable was empty with no flags set,
the options were not being added to explicitly disable features.
This patch corrects that problem and ensures the disable fields
are correctly parsed and added to variables.

(From OE-Core rev: d7b8c247227f3cc82f92292407f548927e9fde78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 13:04:11 -08:00
Richard Purdie b1aeaa8b0d meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
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-05 10:23:53 -08:00
Richard Purdie 06f2f8ce0a meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
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-05 10:22:56 -08:00