Commit Graph

26 Commits

Author SHA1 Message Date
Martin Jansa 855b3252d9 classes/buildhistory: record size of installed package not compressed archive
* usually it's more important to know how much space will each
  package take on target device then size of compressed package
* example for libewebkit0 with 4 different architectures, interesting
  that om_gta02 .ipk is bigger but it's smaller when installed

  before:
  MACHINE     DEFAULTTUNE       SIZE (.ipk file)
  om_gta04    cortexa8t-neon    15996 KiB libewebkit0
  qemux86_64  x86-64            16992 KiB libewebkit0
  spitz       xscale            16148 KiB libewebkit0
  om_gta02    arm920t           16260 KiB libewebkit0

  after:
  MACHINE     DEFAULTTUNE       SIZE (installed)
  om_gta04    cortexa8t-neon    60544 KiB libewebkit0
  qemux86_64  x86-64            63720 KiB libewebkit0
  spitz       xscale            60588 KiB libewebkit0
  om_gta02    arm920t           56268 KiB libewebkit0

(From OE-Core rev: 85e4a77138381a6086d5ebd3a28cb5a94bc26a19)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:44:16 +01:00
Richard Purdie 554e3d2540 package/populate_sdk: Move functions from package_* to populate_sdk_*
This fixes build failures introduced with "classes/buildhistory: implement history
collection for SDK" by moving the functions to files where only the specific image
type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES
were enabled.

(From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 17:40:27 +00:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Mark Hatle c6209c96d9 rootfs_rpm.bbclass: Handle multilib configures with different OS values
[ CQID: WIND00404082 ]

It is possible for the TARGET_OS to change dependending on the multilib used
for a given package build.  mips64 has two potential TARGET_OS values: linux
and linux-gnun32.  The RPM and Smart setup needs to distinguish between the
two otherwise packages of the "non-default" TARGET_OS may be ignored as
incompatible.

(From OE-Core rev: aa760ff7dee4029c30c9de9fc0b640149e4a4c77)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:39:07 -08:00
Mark Hatle b2e4a965f3 rootfs_rpm.bbclass: Reorder feed priority based on multilib image setting
[ YOCTO #3915 ]
[ CQID: WIND00404309 ]

When doing a multilib image build, such as bitbake lib32-core-image-sato, the
system needs to reorder the priority level of the feeds.  If it does not
reorder the priorities, then 64-bit items can be selected by the automatic
dependency resolution in Smart.

(From OE-Core rev: dfbb1aa184955923b85b81aabf944de8f1a1e4b5)

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-02-22 06:09:23 -08:00
Mark Hatle 3df0d2390d populate_sdk_rpm: Re-add a few system provides to the SDK
When building the target SDK portion, we can safely ignore various
package rdepends.  These dependencies are not required on a build
only environment like an SDK.

[YOCTO #3691]

(From OE-Core rev: 1edd44bed9e9829f7c2466928bc3f45be102b84b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Tested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 13:06:43 +00:00
Mark Hatle a6aa74817c package_rpm: Update the way the multilib package names are translated
The variable MULTILIB_PACKAGE_ARCHS has been removed in favor of a
repurposed MULTILIB_PREFIX_LIST.  The format of this item is now
<libid>:<arch>:<arch1>:...:<archN>.  This ensures that we can correctly
translate the libid to one of the supported archs in a tri-lib system.

All of the users of MULTILIB_PREFIX_LIST and MULTILIB_PACKAGE_ARCHS have
been modified accordingly.

Also change the way attempted packages are installed, verify the package
exists in the translate functions, then perform the install in one single
operation.  This results in a significantly faster install time.

(From OE-Core rev: ffe6cf3a1c57defdbe8531bdeb588e199177bb6c)

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-12-17 17:24:51 +00:00
Paul Eggleton 019ba25654 classes/*_rpm: integrate Smart into RPM filesystem construction
Use Smart to construct the root filesystem for images and the contents
of SDKs rather than the custom scripts around rpm we had previously.
This ensures the result when producing an updated image will be the
same as upgrading to the same package versions from an older image on
the target, as well as allowing us to remove a substantial amount of
code making the rpm classes much easier to follow.

Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
SDK implementation and testing as well as a number of bugfixes from
Mark Hatle <mark.hatle@windriver.com>.

(From OE-Core rev: a726ae7c032fac1aa49ce34180fa2ed2dcaf87d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
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-12-17 17:24:50 +00:00
Laurentiu Palcu 0496ba3a9b populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
In order for the postinstall scripts to have access to the recent
improvements when generating the target SDK sysroot, export these
variables in populate_sdk.

(From OE-Core rev: 06151c34f4f4cb669b2f93ebb2f78cfecf698355)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:43 +00:00
Khem Raj bce9306008 populate_sdk_rpm.bbclass: Depend do_populate_sdk task on createrepo-native
Now that we have moved the rpm-createsolvedb.py
script to createrepo-native for good reason of
python-native dependency, we have to make sure
that it is staged before its used, unlike before
where it was under scripts/ dir and always existed
outside the realm of package management.

Fixes build error when doing meta-toolchain builds from
scratch

|
/home/kraj/yocto/poky/build/tmp/work/ppc64e5500-poky-linux/meta-toolchain-1.0-r7/temp/run.populate_sdk_image.26712:
line 610: rpm-createsolvedb.py: command not found
| DEBUG: Python function do_populate_sdk finished
| ERROR: Function failed: populate_sdk_image (see
/home/kraj/yocto/poky/build/tmp/work/ppc64e5500-poky-linux/meta-toolchain-1.0-r7/temp/log.do_populate_sdk.26712
for further information)

(From OE-Core rev: 90cfe33d30ef4f9491bd52e7965c5279a2e2650c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:18:46 +01:00
Paul Eggleton 581af95389 classes/populate_sdk_rpm: add depends on rpmresolve-native
As of OE-Core revision 72d1048a8381fa4a8c4c0d082047536727b4be47,
rpmresolve is now required for complementary package installation during
do_populate_sdk.

(From OE-Core rev: 8a71c1a507289d38a0f675584ab206abfa9aad9a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31 08:02:09 +01:00
Paul Eggleton fa5640d143 Rework installation of dev, dbg, doc, and locale packages
Use a similar mechanism that was previously used to install locales at
rootfs generation time to install other "complementary" packages (e.g.
*-dev packages) - i.e. install all of the explicitly requested packages
and their dependencies, then get a list of the packages that were
installed, and use that list to install the complementary packages. This
has been implemented by using a list of globs which should make it
easier to extend in future.

The previous locale package installation code assumed that the locale
packages did not have any dependencies that were not already installed;
now that we are installing non-locale packages this is no longer
correct. In practice only the rpm backend actually made use of this
assumption, so it needed to be changed to call into the existing package
backend code to do the complementary package installation rather than
calling rpm directly.

This fixes the doc-pkgs IMAGE_FEATURES feature to work correctly, and
also ensures that all dev/dbg packages get installed for
dev-pkgs/dbg-pkgs respectively even if the dependency chains between
those packages was not ensuring that already.

The code has also been adapted to work correctly with the new
SDK-from-image functionality. To that end, an SDKIMAGE_FEATURES variable
has been added to allow specifying what extra image features should go
into the SDK (extra, because by virtue of installing all of the packages
in the image into the target part of the SDK, we already include all of
IMAGE_FEATURES) with a default value of "dev-pkgs dbg-pkgs".

Fixes [YOCTO #2614].

(From OE-Core rev: 72d1048a8381fa4a8c4c0d082047536727b4be47)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:14 +01:00
Mark Hatle 54a18cc1e7 populate_sdk_rpm: Sync multilib configuration with rootfs_rpm
An anonymous python chunk configures some multilib settings for both
populate_sdk_rpm and rootfs_rpm.  The two classes should contain identical
versions to ensure that the generated multilib configuration is the same
for the SDK and the rootfs.

(From OE-Core rev: 0f60722ef460fa826e4f02e7457004e64ca41d76)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 11:38:02 +01:00
Mark Hatle 41550ca5de populate_sdk: Allow for attempt only packages in the SDK
We want to be able to supply attempt only packages in the SDK in order to
support more advanced SDK images that more closely match specific image
recipes.

(From OE-Core rev: 9b9efa96537f4977b158c29151e53d02600d2294)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:58 +01:00
Richard Purdie 0b0674ebcd populate_*.bbclass: Correct INSTALL variable name after recent multilib changes
(From OE-Core rev: 379c77d1516fe8fdbd1cd7063f709b5266872b03)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 18:05:57 +00:00
Richard Purdie 5bcb0963dc populate_*.bbclass: Drop pointless fakeroot attribute (fakeroot is at the task level)
(From OE-Core rev: 2cac20439d4eb0b3a21ce37e2fa670941e6356c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 18:05:57 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Richard Purdie 70e154b7f6 populate_sdk_rpm: Add missing /bin/sh from rpm ignore list for the SDK
The target SDK packages don't need to fulfil a shell dependency
so add /bin/sh to the list of packages we don't need to resolve.

(From OE-Core rev: da761df049249e1ca99eb569642246e51e5bae91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-04 13:46:27 +01:00
Richard Purdie e377f2bc5f populate_sdk_rpm: add pkgconfig(pkg-config) to the list
(From OE-Core rev: 368b150416688654e35229a63b87177b52e83d02)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-23 20:01:02 +01:00
Saul Wold ac97d42baa populate_sdk_rpm: add items to the INSTALL_PROVIDESNAME_RPM list
This fixes a problem when building meta-toolchain-gmae, by adding items that
will be provided by the host system, such as /bin/bash, /usr/bin/env and
libGL.so

(From OE-Core rev: 01361f9d25b0a0027bbbe713b93051a4663b14fc)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
RP: libGL.so() -> libGL.so
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-23 01:07:01 +01:00
Mark Hatle 06d4cf01ff populate_sdk_*: Sync SDK and regular rootfs functions
In order for things to be easier to maintain in the future, sync up
the sdk and rootfs versions.

(From OE-Core rev: 3c78da15457d8d20c9964cd845f6e021d442aaae)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 14:32:11 +01:00
Mark Hatle f9da3c269f bitbake.conf: Add SDK_PACKAGE_ARCHS
Add SDK_PACKAGE_ARCHS to avoid the sed operations we were previously doing
inside of the variouns populate_sdk functions and related items.

Also add documentation to populate_sdk to explain when the various functions
are expected to be doing.

Finally fix a bug in populate_sdk_rpm where the wrong value was being set,
noticed while working on this change.

(From OE-Core rev: 587c1d5bac71fa6faa65ee3a271391cbf931e8f7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 14:32:11 +01:00
Mark Hatle aa2aa9c1b2 populate_sdk_rpm.bbclass: Add the necessary solvedb lock
[BUG #776]

When using the RPM solve databases, we have to lock our operations
to avoid removing it while it's in use.

The same lock is shared by the rootfs_rpm.bbclass

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-28 20:48:08 +00:00
Mark Hatle 08c8f7bb73 rootfs_rpm: Fix rootfs generation using RPM packages
[BUG #756]

Fix bug #756.  The rootfs contains a control file /etc/rpm/platform
that specifies the default system platform, as well as patterns for
compatible architectures.  This file was not being setup properly due
to a misunderstanding of the format in a previous patch.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-25 17:31:50 -06:00
Mark Hatle ab0e1bed22 package_rpm: Fix solverdb generation
The RPM solverdb was potentially being generated multiple times.
Fix this by ensuring we only process each directory once.

Also correct an issue where the solution did not necessarily follow
the preferred architecture ordering, reverse the default Poky ordering
so that preferred is listed first.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-16 07:34:51 -08:00
Lianhao Lu 8b6626abbf populate_sdk_rpm.bbclass: Added rpm support for populate_sdk task.
This is preparation commit to support using rpm in populate_sdk task.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-02-01 23:59:38 +00:00