Commit Graph

2203 Commits

Author SHA1 Message Date
Paul Eggleton 9d6630d174 classes/qmake_base: support linux-gnuspe/linux-uclibcspe TARGET_OS
Fix borrowed from OE-Classic. This should fix build failures during
do_configure of Qt applications with the p1022ds machine from
meta-fsl-ppc, for example.

(From OE-Core rev: a19fc8e19a6cc6885a1e0616b1f42cc49c8f2c9f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-05 17:32:14 +01:00
Richard Purdie 8d6ecfbe84 sanity.bbclass: Move back to running at ConfigParsed time
If we don't do this, users can get extremely confused errors since the sanity tests
happen too late (after parsing) and don't see the warnings.

Also cleanup messages about merging configuration file changes to give better
hints at where the updated files may be.

(From OE-Core rev: 7b8a68cda7ef8186e834b39e73ee12a55b33f85b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-05 17:32:14 +01:00
Bruce Ashfield d7805cfac4 linux-yocto: check for bad SRCREV before branch checks
do_validate_branches ensures that the desired SRCREV is at
the tip of every branch that contains the revision. To do this,
it looks for containing branches and processes them.

This processing was mistakenly placed before the check for an
invalid SRCREV, hence a git error message is seen in the log
if a bad SRCREV is used, rather than a clear message.

reordering the checks, and fixing a check for master, ensures
that clear messages are generated in all cases.

(From OE-Core rev: 7e4518bf88af53b09536a3bafcd4c392a094023f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 14:46:17 +01:00
Bruce Ashfield 611f16a8d8 linux-yocto: fix unapplied patch error message
When patches fail to apply, the status of all pending patches should
be exported to the logs and to the user. Currently, a missing export
of GUILT_BASE makes it look more like an internal error, than a 'normal'
patch failure:

    | [ERROR] unable to complete push
    | pending patches are:
    | Patches directory doesn't exist, try guilt-init

With this variable exported, we have this:

  | [INFO] validating against known patches  (qemux86-standard-meta)
  | error: patch failed: Makefile:2
  | error: Makefile: patch does not apply
  | To force apply this patch, use 'guilt push -f'
  | [ERROR] unable to complete push
  | pending patches are:
  | links/files/0002-makefile-patch.patch

(From OE-Core rev: b2b2512cbc4196fa0f814be3677517dab30e5b52)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 14:46:17 +01:00
Paul Eggleton 2a21c83300 packagegroup-core-console: remove
This provides one package group, packagegroup-core-apps-console, which
is usually brought in by adding "apps-console-core" to IMAGE_FEATURES.
Aside from the naming inconsistencies, this is a group of mostly
unrelated packages, none of which are actually "apps". Handling each
one:

* dbus: should mostly be brought in by package runtime dependencies
* avahi-daemon: if you are using packagegroup-base (as all images that
  inherit from core-image do) this is brought in by having "zeroconf" in
  DISTRO_FEATURES.
* portmap: not very useful by itself; should be brought in by selecting
  NFS server/client through other means.
* psplash (or whatever SPLASH is set to): this has been changed to be
  an explicit item "splash" in IMAGE_FEATURES. Since this is a fairly
  fundamental feature, a piece of code has been added to automatically
  handle this for images still using apps-console-core (and show a
  warning).

(From OE-Core rev: 592d6e602466628d10704835a7b07d3d713f58e1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:00 +01:00
Paul Eggleton 86d4bb2c3e packagegroup-core-qt: rename -demos to -demoapps
Try to avoid confusion with the Qt demos distributed with Qt itself.

(From OE-Core rev: dbbcc0cb9d2cbc66027c800075b94eb9b7110a00)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:00 +01:00
Paul Eggleton 53284ed01b classes/packagegroup: disable superfluous tasks
Disable tasks other than do_package* (similar to how image.bbclass
disables everything except do_rootfs). This saves a little time as well
as neatly avoiding the LIC_FILES_CHKSUM verification within do_configure
which is not needed for package groups.

(From OE-Core rev: fde2b0db798f03cf297a0d466a9c3a444f1321f3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:59 +01:00
Paul Eggleton 8eba44660e packagegroup-core-x11*: adjust X11 package groups
Now the Sato pieces have been moved out, rebase packagegroup-core-x11 on
packagegroup-x11-mini but using the structure/contents of meta-oe's
task-x11 so that it can replace that; rename packagegroup-core-x11-mini
to packagegroup-core-x11-base and pull in the xserver/utils packages via
packagegroup-core-x11, and move both of these recipes under
recipes-graphics.

x11-mini is renamed to x11-base as it's what people should build on top
of and since x11-mini is newer, the corresponding IMAGE_FEATURES item is
less likely to be used in existing user recipes.

(From OE-Core rev: 0cc9ced7d96b960994b0671095bc74becfc55e2c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:58 +01:00
Paul Eggleton ce1f15059a packagegroup-core-x11: move out Sato applications
Move Sato applications to packagegroup-core-x11-sato.

Note that this eliminates both the apps-x11-core and apps-x11-games
IMAGE_FEATURES; in practice it is unlikely these were useful to anyone
outside of the Sato images however.

(From OE-Core rev: 46cc375f29d5ecac7311613514a474f288d7c781)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:57 +01:00
Paul Eggleton 073a12c9cb classes/packagegroup: add ability to disable complementary packages
This allows package group recipes that do not want the automatic
addition of complementary packages (e.g. for SDKs) to still inherit from
this class and thus it becomes very easy to determine if a recipe is a
package group which we need to do in certain circumstances.

(From OE-Core rev: 3a3ae22bc0be5b36e0400986930f30c22a61a74e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:56 +01:00
Paul Eggleton 14bf9637be classes/packagegroup: Use package group nomenclature
(From OE-Core rev: aafd94acaa6517e3322855123c43a7b5cd5916ee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:56 +01:00
Paul Eggleton 272cb74d70 Rename task to packagegroup
"Package group" is a much more appropriate name for these than task,
since we use the word task to describe units of work executed by
BitBake.

(From OE-Core rev: 424dcf7046e4ad09dcc664eb1992201195247fcf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:55 +01:00
Paul Eggleton f1df3f828b classes/core-image: remove erroneous nfs-server comment
It has never been true that this enables exporting the entire rootfs.

(From OE-Core rev: ecd818f1a7a46aa0eeffe48445f2cf0db5aab67a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:54 +01:00
Paul Eggleton 153d413b47 classes/core-image: remove *_IMAGE_FEATURES variables
This indirection does not add anything in terms of configuration and
only serves to increase confusion; and given the nature of these it is
unlikely they are being used outside of OE-Core. Change the sato-sdk and
sato-dev images to be based on the main Sato image (avoiding the need
for a common SATO_IMAGE_FEATURES variable) and eliminate all references
to them.

Fixes [YOCTO #2458].

(From OE-Core rev: 6488842b0d03cfec9f8675eca5a2e05675decf66)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:54 +01:00
Paul Eggleton 5f0e3d8c89 classes/core-image: remove SSHSERVER_IMAGE_FEATURES
This variable was added in the very same commit that added a mechanism
that makes it obsolete: if you have dropbear and you want openssh, you
just add ssh-server-openssh to your IMAGE_FEATURES and it will replace
dropbear via IMAGE_FEATURES_REPLACES_.

(From OE-Core rev: 6c78d99cc2e54a99af22357d7567f64e864949b9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:54 +01:00
Richard Purdie 8cb5c02167 image.bbclass: Convert runtime_mapping_rename to event handler
(From OE-Core rev: 05e67417ca3174d1f9279f0de308a9d40933b461)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:11 -07:00
Tomas Frydrych 4759a71d3b package.bbclass: fix stripping for kernel modules
runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has
to be passed an integer. Passing None fails with: TypeError: unsupported
operand type(s) for &: 'NoneType' and 'int'.

(From OE-Core rev: 67f21c6c698464959c27c7e65ee537ab4c378944)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:09 -07:00
Richard Purdie 1c64c6b300 sstate.bbclass: Remove hardcoded task mappings
I've not idea why this got left in but as per the comment, it needs fixing
and we shouldn't have hardcoded mappings like this. Lets remove it
and dynamically generate the data instead.

[YOCTO #3039]

(From OE-Core rev: 2df064ad46c1510fa8a401c22db4ab3278c3c807)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07: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 58a8a38aa2 nativesdk: Convert to use classextend.py
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.

(From OE-Core rev: f01f0b8aed25af889f48fe1afff96feb3d9ed120)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:05 -07:00
Richard Purdie 9ba1e33e2d sstate: Ensure master.list exists if it doesn't already
This fixes builds where master.list doesn't already exist. This
change was meant to be part of the previous sstate commit but ended
up separated.

(From OE-Core rev: c2109b765b24a7ffe4781257ad3fe4641a3b2a49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 22:45:56 -07:00
Richard Purdie 59260f952f sstate.bbclass: Detect overwriting files in sstate controlled directories
We have a potential problem where two sstate packages try and touch the same
file. This adds code which will print a warning whenever this happens.

The implementation does but by maintaining a master file list and comparing
file accesses against this. There are a number of places we have duplicate
accesses which are harmless, mostly in the deploy directory so these
are whitelisted.

For now the code prints warnings, this could be strengthened in future to
become error messages. Whilst working on this code on and off over the past
few months various issues were uncovered, some serious.

[YOCTO #238]

(From OE-Core rev: 1f1b6f93d6b7aa8c9bd9bb5b1826997812e36932)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:06 -07:00
Robert Yang 44b8c1bb30 archiver.bbclass: fix the remove error
* The "tar-package" is used for saving the "Source" list for rpmbuild,
  there is no such a file when "ARCHIVER_MODE[type] ?= srpm", and there
  would be errors, it hadn't happen before was becuase that the remove
  function didn't work. Let the "rpmbuild --rmsource" to remove the
  Sources, and the remove function will just remove the tar-package file.

* Remove several unwanted "try ... exception" sentences, let the error
  raise rather than ignore them when the error happens.

* Remove several un-needed code.

[YOCTO #2619]

(From OE-Core rev: 6ac3e8be0307ecaea5e92f8bda94f1cd2193a47a)

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>
2012-08-29 16:02:09 -07:00
Robert Yang 4396677ade copyleft_compliance.bbclass: remove the duplicated code
A part of the code in copyleft_compliance.bbclass is duplicated to
archiver.bbclass, remove the duplicated lines.

[YOCTO #2619]

(From OE-Core rev: 731e1171d6c35ed086b36c081f48dba2015319f8)

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>
2012-08-29 16:02:08 -07:00
Robert Yang 436211f052 archiver.bbclass: remove the "upper()" function
The configuration value from the conf file is lower case, e.g. srpm,
tar, so there is no reason to use the upper case which makes things
complicated.

[YOCTO #2619]

(From OE-Core rev: 036a2502689092bb278b929f6e8ef2a119c1cf35)

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>
2012-08-29 16:02:08 -07:00
Robert Yang 3883f82926 archiver.bbclass: fix the fakeroot and other issues
* Fix the fakeroot issue
  The archiver.bbclass is used for archiving sources, patches, and logs,
  it uses the "rpmbuild -bs" from the package_rpm.bbclass to generate the
  .src.rpm, but it didn't work (it's not easy to explain it clearly):

  Reason:
  - It directly used the "fakeroot" command, we don't have such a
    command in native tools, so it would use the fakeroot from the host,
    and it would fail when there is no fakeroot on the host.

  - The "rpmbuild -bs" doesn't need to work under root, but it is in the
    function do_package_write_rpm which is running under fakeroot, and
    "rpmbuild" needs to know the source file's user/group name, the source
    file is the tarball which is created by the postfuncs of do_unpack
    or do_patch which doesn't use the fakeroot, so the created file's
    owner would be the real user, e.g.: robert, but there is no such a
    user under our native tools' fakeroot(pseudo), then the rpmbuild would
    fail. It worked when use the host's fakeroot in the past was because
    that the host's fakeroot knows the users on the host.

  Fix:
  - Remove the incorrect "fakeroot".

  - Change the source file's owner to root.root under fakeroot will fix the
    problem.

* Other fixes:
  - The typo: "do_remove_taball -> do_remove_tarball" which will cause the
    tarball is not removed.

  - Add the _sourcedir defination to the rpmbuild command since the the
    SOURCES would be added to the specfile when archiver.bbclass is
    inherited, otherwise there would be errors when "rpmbuild -bb", though
    the build is OK. It only added the defination to "rpmbuild -bs",
    didn't add to "rpmbuild -bb".

[YOCTO #2619]

(From OE-Core rev: ac152f277fdff256def01af4268215a05685a0f7)

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>
2012-08-29 16:02:08 -07:00
Robert Yang 2ba95cc79e archiver.bbclass: fix the coding style
* Make the comment line under 80 characters.
* Use the triple double quotes for the docstring.
* Add a whitespace behind the comma (,).
* Other minor fixes.

[YOCTO #2619]

(From OE-Core rev: 885a95992abe11ebef7a8e4363e6002ee80403bf)

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>
2012-08-29 16:02:07 -07:00
Robert Yang c96f6ee659 archiver.bbclass: indent fixes
Several fixes:
* It uses mixed tab and whitespace as the indent in one function,
  Fix them to use "4 spaces" as the indent.

* Remove the unwanted blank, for example, more than one blank lines
  appeared together.

* Remove the tail whitespace.

[YOCTO #2619]

(From OE-Core rev: 5eacbcdf306d9e743164a1563559cd24eb5fffe0)

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>
2012-08-29 16:02:07 -07:00
Richard Purdie 266d9ce1cf staging.bbclass: Might as well drop the applications, fonts and pixmap directories from ${datadir}
These cause various file conflicts and aren't useful within the sysroot anyway. We might
as well remove them. Whitelisting the contents of ${datadir} that *is* useful might
be a better option in future.

(From OE-Core rev: c9fdd2fd108fa557d8f60339405447b4ea4d6f64)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-29 16:02:07 -07:00
Bruce Ashfield af7cd07fae kernel-yocto: don't require meta branch for custom repos
The commit a9f11849 [linux-yocto: explicitly export KMETA to scripts]
allows the meta branch name to be changed by exporting it to all
phases of the build.

But if a custom kernel without a meta branch is built, we end up
passing an empty string to the creation scripts, which breaks the
build since input is expected.

Inhibiting the export of KMETA to the creation scripts when empty
fixes the problem.

(From OE-Core rev: 61162fbe01993659301fe2e821bf9c3e801206d8)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:01 +01:00
Bruce Ashfield 01ce721684 kernel-yocto: set master branch to a defined SRCREV
To support custom repositories that set a SRCREV and that only have
a single master branch, do_validate_branches needs a special case
for 'master'. We can't delete and recreate the branch, since you
cannot delete the current branch, instead we must reset the branch
to the proper SRCREV.

(From OE-Core rev: de5bb5879fa3282c46dc1ede36af34eaab8f647f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:00 +01:00
Liang Li 9a1705ef80 kernel.bbclass: fix INC directory for SLANG
In the kernel's tools/perf/Makefile CFLAGS was previously hard coded to
contain "-I/usr/include/slang" to work with hosts that have
"/usr/include/slang/slang.h" as well as hosts that have
"/usr/include/slang.h". This path can cause compile warnings like:

  cc1: warning: '/usr/include/slang' doesn't exists.

  or

  cc1: warning: include location "/usr/include/slang" is unsafe for
  cross-compilation [-Wpoison-system-directories]

Then in some cases warnings become errors if WERROR is enabled hence
build errors.

In coordination with a kernel fix, we can fix this error for all
kernels by modifying the perf Makefile within the staged kernel
source.

(From OE-Core rev: 4e0daf05ed04e9fb4343032c6290a379f53b89f3)

Signed-off-by: Liang Li <liang.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:00 +01:00
Mihai Lindner a807818544 grub-efi: fix Nothing PROVIDES 'grub-efi-x86_64-native'
"ERROR: Nothing PROVIDES 'grub-efi-x86_64-native'" is returned when
trying to build meta-intel/meta-cedartrail with DEFAULTTUNE = "core2-64"
Used TRANSLATED_TARGET_ARCH instead of TARGET_ARCH in grub-efi.bbclass

[YOCTO #3013]

(From OE-Core rev: 20e2aaacb36113604c4ea7c40dd0bbbf224b8360)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:00 +01:00
Richard Purdie 3ea34e035a distutils/steuptools: Fix files layout and unbreak builds
The last two distutils changes progressivly broke the builds. Firstly they
moved things from the site_packages directory to being higher up the tree
which introduced package QA warnings as a side effect. Secondly, it interacts
badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA
warnings and also passes extra options to setuptools to deal with the
--root option it passes.

(From OE-Core rev: bed18d5df7915e4127a538be9c7550e185c8c850)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-24 17:25:15 +01:00
Matthew McClintock c7cfe7759e distutils.bblass: change order of args to install step
This let's the user override install-lib argument again if it needs
to be something else, otherwise things like python-setuptools
won't be able to modify the install-lib dir

This fixes a new issue exposed by my previous distutils patch
that fixed the python modules default install location. Also,
it removes running the install step twice which was inadvertant

(From OE-Core rev: 3b23feca31480cc56f55301fd0274e622c40b522)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 14:22:55 +01:00
Paul Eggleton bf64b6ec39 classes/package: document do_packages_split arguments
This function takes quite a number of arguments and can be tricky to use
properly; this is not made easier if it is undocumented, so document all
of the arguments. (No functional changes, comments only.)

(From OE-Core rev: 324fbcc047819b6948d13eda627ec898cb1f1eb8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:54 +01:00
Robert Yang 46b3ab1f2b package_rpm.bbclass: fix and enhance the incremental rpm generation
The incremental rpm generation usually broke when package_rpm.bbclass
changed, change its implementation to make it more stable:

* It depended on the previous and current saved manifest files in
  the past, it would break when the manifest changed. Now query the
  previous and current installed pkgs from rootfs/var/lib and
  rootfs/install/, this would be more reliable, the manifest's change
  would not affect it any more.

* Add explanations before package_install_internal_rpm to explain what
  does the function do.

* Remove an unwanted "awk '{print $1}'".

[YOCTO #2906]

(From OE-Core rev: 5d8ca498e09438bd91654fa8b8b2c970956d88e3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21 12:15:31 +01:00
Andy Ross 40d3579ced insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be
set to something like "/usr/lib/../lib".  This should be detected as
"/usr/lib" and generate a warning.

(From OE-Core rev: 72a924d0686389d648338efd3f675fc85ee2d181)

Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21 12:15:30 +01: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
Paul Eggleton ba8ba42b9f classes/sanity: remove texi2html from required host utilities
texi2html is not actually required to build world of OE-Core anymore,
so we don't need to mandate it. The only difference without it (verified
with buildhistory) is that groff doesn't produce HTML documentation; the
rest of its docs are still produced and packaged and no other packages
are affected.

Part of the work towards [YOCTO #2423].

(From OE-Core rev: aa1c4519f8e549b43a7d8bc51c5342d3409b464b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-20 16:53:17 +01:00
Martin Jansa 2b6268b5f5 kernel.bbclass: Preserve generated headers only if they exist
* I have 2.6.37 kernel without this directory and do_install now fails
  after 813256bf7bb6e26d542d5f769e2802564116ebe5

(From OE-Core rev: 9a83afe0794e96590aee374555efea91b3085b91)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-20 16:53:17 +01:00
Bruce Ashfield a9f11849d8 linux-yocto: explicitly export KMETA to scripts
The kern-tools scripts can support a meta branch and directory of a name that
isn't "meta", but they need the name passed through the environment variable
KMETA. ensuring that KMETA is exported in the shell environment sets the stage
to support flexible meta branch name.

(From OE-Core rev: 9b90c8ace04c88ac6105f0bf686f9abc70fe8074)

Signed-off-by: Bruce Ashfield <bruce.ashfield@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:56 +01:00
Bruce Ashfield 7a79f7412b linux-yocto: make KBRANCH the exception and not the rule
The kernel branch is no longer required by the yocto-kern-tools
to locate BSP feature descriptions (it is the MACHINE:KTYPE
descriptor), so we no longer require that the BSP branch be
explicitly set.

If a kernel branch is explicitly set, it is now used to trigger
a checks to ensure that the branch really is being built.
Otherwise the branch that the machine description creates will
be built (just as it always was).

This further simplies the use and configuration of a linux-yocto
based kernel recipe.

(From OE-Core rev: 3cac3ce65abae9dc253641a2004440a2b38fd44d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@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
Khem Raj 0a0ffcf18b kernel.bbclass: Preserve generated headers
asm/unistd.h includes asm/unistd_64.h on x86_64
and asm/unistd_32.h on i386 but these files are
generated files in 3.4 and when we do 'make clean' they get
deleted and it shows up as an error when building
external modules. May be its a 3.4 kernel bug may be not
but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having
run make clean.

(From OE-Core rev: 813256bf7bb6e26d542d5f769e2802564116ebe5)

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-08-19 10:45:55 +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
Richard Purdie 61ed74a725 utility-tasks: Set T to alternate location during do_clean
There is a race where do_clean tries to clean WORKDIR but there are logfiles
written into ${T} by bitbake and this can lead to exceptions due to open files.

The easiest solution is to redirect T to a different location for the do_clean
task, hence avoiding the errors and also allowing the logfiles to be visible
somewhere. ${LOG_DIR} seems an appropriate place for this.

[YOCTO #2846]

(From OE-Core rev: eef9d6c2d52f5264a6e7a9d882f8323f9793fd7f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:23:59 +01:00
Robert Yang 21dcd88cee rootfs_deb: move the lock from WORKDIR to DEPLOY_DIR_DEB
* There would be race issue if we put the lock to the WORKDIR, for
  example:
  bitbake core-image-sato core-image-sato-sdk

  If the lock is in their own WORKDIR, the apt-rootfs.conf and
  Packages.gz maybe be written by two tasks at the same time, which
  would cause unexpected errors.

* Create ${target_rootfs}/etc since the "tar -C" needs it.

Note:
  * The rpm has put the lock to DEPLOY_DIR_RPM
  * The ipk doesn't need it since it has locks for each deploy directory
    and put the opkg.conf in his own WORKDIR, which doesn't like deb put
    the apt-rootfs.conf in ${STAGING_ETCDIR_NATIVE}/apt/.

[YOCTO #2495]

(From OE-Core rev: 23ac392f8b868296eb9e7cd840f9b28ed6917b27)

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>
2012-08-17 18:04:23 +01:00
Florin Sarbu 1356f8fefd Add MPL version 2.0 license in common-licenses dir as well as adding a non-SPDX license name in license.bbclass
(From OE-Core rev: 89efdb7c561e5af87da446c7767d3ad5809a7d13)

Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 18:04:21 +01:00
Matthew McClintock 3a51c0c6b0 distutils.bbclass: fix libdir for 64-bit python modules built with distutils
Without this some modules will be intalled in /usr/lib/python2.6/
instead of /usr/${libdir}/python2.6

(From OE-Core rev: bc6bd774aa8a3e085e9cabcefb11c3fc537139d5)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 18:04:20 +01:00
Mark Hatle bfa522b2b5 package_rpm.bbclass: Fix attemptonly install failures
During an attemptonly install, if you try to install two packages that
conflict with each other, a message is generated:

 error: Failed dependencies:
     dropbear conflicts with openssh-6.0p1-r4.ppc603e
     dropbear conflicts with openssh-sshd-6.0p1-r4.ppc603e

This is placed onto stderr (vs stdout), which was not being redirected.
This allowed the log-check code to find the magic key of "Failed" causing
the package installation process to fail.  Instead the proper behavior is to
simply ignore the error and proceed with the install.

(From OE-Core rev: 16d8d7fdda4ae7d108f5d50cde3f6104e231bd23)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 18:04:18 +01:00