Commit Graph

20 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
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
Laurentiu Palcu 82d6ef6a7a populate_sdk_deb.bbclass: put back INSTALL_PACKAGES_NORMAL_DEB
This commit (0b0674ebcd) was also changing
the populate_sdk_deb.bbclass but the deb backend does not support
multilib just yet. So, when compiling the standalone toolchain tarball,
we ended up with an empty tarball if the deb package manager was chosen.

Reverting the deb part until the multilib support is added to deb.

[YOCTO #3532]

(From OE-Core rev: 34baee37caccced13fb26f446b865c9f25edf339)

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-11 15:54:36 +00: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
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 b70c9154e4 image.bbclass: Add support to build the SDK in parallel with the image
When building an image recipe, you can now build a companion SDK by
calling the populate_sdk task:
  bitbake -c populate_sdk core-image-minimal

Note: there are still issues w/ the SDK not working completely with
multilibs.

A lock is required between rootfs and populate_sdk activities to prevent
configuration file clashes and similar package management problems in ipk
and deb based systems.  (RPM already had a lock for a different reason.)

(From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab)

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
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 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
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
Dexuan Cui 23773a899b deb packages support: switch from /var/dpkg to /var/lib/dpkg
[YOCTO #1086]

The pach was backported from OE:
http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f

(From OE-Core rev: d1e6f49a6473df3c626100ba01b27485f735c33b)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21 13:42:49 +01:00
Dexuan Cui c2bbc59b21 package_deb.bbclass, populate_sdk_deb.bbclass: fix meta-toolchain-gmae build
[YOCTO #1070]

Currently with deb packaging, we have 2 issues when running
"bitbake meta-toolchain-gmae".

1) when MACHINE="qemux86", SDKMACHINE="i686", INSTALL_BASEARCH_DEB is "i686",
too. This causes the following ERROR:
| E: Couldn't find package task-sdk-host-nativesdk
NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed

This is becasue: due to the DPKG_ARCH mapping, we create such a deb package
tmp/deploy/deb/i686-nativesdk/task-sdk-host-nativesdk_1.0-r10_i386.deb; dpkg
can't recoginze the package. We need to map INSTALL_BASEARCH_DEB in the same
way.

2) when MACHINE="qemux86", SDKMACHINE="x86_64", INSTALL_BASEARCH_DEB is
"x86_64", too.
We get such an ERROR:
| E: Couldn't find package task-cross-canadian-i586
NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed

This is because: dpkg can't recognize the generated package
tmp/deploy/deb/x86_64-nativesdk/task-cross-canadian-i586_1.0-r0_i386.deb
Here the "i386" suffix is incorrect and should be "x86_64" -- the i386
comes from the line
DPKG_ARCH_i586 ?= "i386" in package_deb.bbclass.
However, for canadian package, actually here the overriding of DPKG (from
"x86-64" to "i386") should not happen -- it accidently happens just because
TARGET_ARCH exists in OVERRIDES. We can move the overriding logic to the
anonymous python function to work this around.

(From OE-Core rev: 63010b9ee89643c8e83656783231f0a7848d9e45)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-15 11:23:56 +01:00
Dexuan Cui 921d73b405 populate_sdk_deb.bbclass: add the missing parameter - for tar
(From OE-Core rev: a47ceddd6eb91e7564e6e48ddbb5d490f3d2767d)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 22:54:15 +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 d3d236b2bf Misc hard link fixes
I searched the various classes and looked for copies that should attempt to
preserve hardlinks.  This fixes the majority of this copies by switching to
using tar as the copy method.  It also has the side effect of preserving sparse
files.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-09 22:46:30 +00:00
Lianhao Lu 5571753a5d populate_sdk_deb.bbclass: Added deb support for populate_sdk task.
This is a preparation commit for adding deb support in populate_sdk
task.

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