Commit Graph

122 Commits

Author SHA1 Message Date
Alexander Kanavin 8c1c392ca3 dnf: move the entire dnf/rpm4 stack to Python 3
[YOCTO #11180]

(From OE-Core rev: bedcdc4cf921b70a8cfb16c6684668d0ac9e1942)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:13 +01:00
Alexander Kanavin 529244ee21 run-postinsts: simplify the logic of whether to install it to images
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

(From OE-Core rev: 697804229a172125ce7d3bfc9b343812d6fe3240)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 67615e0175 rootfs_rpm.bbclass: migrate image creation to dnf
To properly look at this patch, you probably need a side-by-side diff viewing tool.

(From OE-Core rev: 65581c68d130fa74d703f6c3c92560e053857ac7)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Joshua Lock 3c59b1bf93 meta: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.

Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)

(From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Stephano Cetola 6b66e9317f Allow for simultaneous do_rootfs tasks with rpm
Give each rootfs its own RPM channel to use.  This puts the RPM metadata
in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR
where other tasks may race with it.

This allows us to reduce the time that the rpm.lock is held to only the
time needed to hardlink the RPMs, allowing the majority of the rootfs
operation to run in parallel.

Also, this fixes the smart tests by generating an index for all packages
at the time of the test, rather than using the one provided by the
rootfs process.

Original credit for the enhancement should go to Steven Walter
stevenrwalter@gmail.com.

(From OE-Core rev: a92c196449c516fe51786d429078bbb1213bb029)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-12 15:25:22 +01:00
Saul Wold 8d56c54107 rootfs_rpm: Increase rootfs size
This doubles the amount of extra space that is provided for SMART and
RPM, as they consume more disk space during qa testing via testimage

[YOCTO #9800]

(From OE-Core rev: 2d636068d9d3a1ea2db3ace49462be13ba9ef125)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-20 12:07:49 +01:00
Richard Purdie 7fa6eeba1c classes/lib: Add expand parameter to getVarFlag
This sets the scene for removing the default False for expansion
from getVarFlag. This would later allow True to become the default.

On the most part this is an automatic translation with:

sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g'  -i `grep -ril getVar *`

In this case, the default was False, but True was used since in most
cases here expansion would be expected.

(From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:00 +00:00
Martin Jansa cf218e56af rootfs_*.bbclass: don't add BUILDNAME to do_rootfs vardepsexclude
* rootfs_*.bbclass doesn't use this variable anymore, so we can drop it

(From OE-Core rev: bf91547d887aee2893e26e6073e12c540222b422)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:50:27 +00:00
Richard Purdie 2501287c69 rootfs_*: Refactor common depends/lockfile task flags
(From OE-Core rev: 96427656ef73bb50753a33ec6ad5e73de711ceb3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie e6837f785c classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>
There is no real reason to have these separate files any longer. It does
mean in meta-toolchain type recipes some extra variables are defined but
it also means the common code can be grouped and maintained together
which I believe is more beneficial. We therefore merge the classes.

(From OE-Core rev: 2cf42b49003494e1b10775523c9a2547eaf16ea4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Otavio Salvador 4c14b09498 Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

(From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:19:19 +01:00
David Nyström f9c7936045 do_rootfs: Add PACKAGE_FEED_URIS as a vardep
A bit uncertain on where to put this, suggestions welcome.
Needed to automatically rebuild do_rootfs when PACKAGE_FEED_URIS
change.

(From OE-Core rev: c779bf78f2e1f66f3c8a6b02054e39bee4ea88a5)

Signed-off-by: David Nyström <david.c.nystrom@gmail.com>
Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07 15:05:08 +00:00
Hongxu Jia 62c625e3c1 Cleanup rootfs_rpm,package_rpm bbclass files
This commit cleans up the functions that were ported to python.

(From OE-Core rev: a4fe5263a683b73d0318fe3c0c55382c084f25b5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Jeffrey C Honig 33c97ee94d rootfs_*.bbclass: List which post-install scripts can not be run
When preping a read-only rootfs and finding some post-install
scripts that can not be run, list the names of said scripts to
avoid having to look around the rootfs to find a list.

(From OE-Core rev: 0188120691f433fdccf71b92618115195278c0af)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 14:08:33 +00:00
Richard Purdie 93ec1e347c classes: Remove references to _remove in function names since this may become a bitbake keyword
There is a good chance we might want to support a bitbake operator
"_remove" which works in a similar way to _append and _prepend. As
such, we can't use those keywords in function or variable names.

(From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148)

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>
2013-08-26 11:29:45 +01:00
Paul Eggleton f629afe153 classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPM
Add support for the BAD_RECOMMENDATIONS variable that can be used to
prevent specific packages from being installed via an RRECOMMENDS
relationship when using the RPM backend. (Previously this
functionality was only available when using ipk packaging.)

In the process this moves the defaulting of BAD_RECOMMENDATIONS (as
empty) to bitbake.conf since it is no longer specific to the ipk
backend, as well as unifying some of the code that creates the
configuration for smart for use on the host and target.

Fixes [YOCTO #3916].

(From OE-Core rev: 4e85129a7d47baf3e32b815cbc277bff84e085a0)

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>
2013-07-29 13:09:15 +01:00
Laurentiu Palcu e4a136a6bd rootfs_rpm.bbclass: switch to using run-postinsts
Since run-postinsts was made generic, use it for RPM too.

(From OE-Core rev: 1ba44302f522a42535c9ad7d2fcccc06ba4c20b3)

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>
2013-06-11 15:38:05 +01:00
Laurentiu Palcu b11f818307 rootfs_*.bbclass: add some helper functions
This patch adds the following helper functions:
 * delayed_postinsts - outputs the list of delayed postinstalls;
 * save_postinsts - this will save the delayed postinstalls for ipk/deb
   in /etc/(ipk|deb)_postinsts;
 * rootfs_remove_packages - removes packages from an image;

Additionaly, this patch will remove a piece of code in
rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for
all backends;

[YOCTO #4484]

(From OE-Core rev: 928df79cd3964f775c4c6e4283ef84b8882f9328)

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>
2013-06-11 15:38:04 +01:00
Zhenhua Luo 4b50385e2c rpm: split out run-postinsts
1. Split out run-postinsts script into separated package, sometimes only the
   postinsts script is required to run all postinsts scripts in /etc/rpm-postinsts/
   instead of the whole rpm package.
2. Set ROOTFS_PKGMANAGE_BOOTSTRAP to rpm-postinsts

(From OE-Core rev: 056490ddbfdbb6cc6fa0d8ff8716d64819d6b16c)

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:54 +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
Robert Yang cdd103823e rootfs_xxx.bbclass: fix bitbake -S hashes mismatch error
The bitbake -S <image> has errors, e.g.:

NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated
(/buildarea/lyang1/poky/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 8e44f2296f2d6cdf2ccb0236910ef59b and
46357d5e36713646b47b0fe2233e3c8c

This is caused by the BUILDNAME which is defined in cooker.py:

if not self.configuration.data.getVar("BUILDNAME"):
    self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'))

The time changes during the first parsing and reparsing, so there is the
error, we already have:

do_rootfs[vardepsexclude] += "BUILDNAME"

but what we need is
rootfs_xxx_do_rootfs[vardepsexclude] +=  "BUILDNAME"

The do_rootfs doesn't depend on BUILDNAME directly, but indirectly, the
depends tree is:

do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME

So add BUILDNAME to rootfs_xxx_do_rootfs[vardepsexclude] would fix the
problem.

[YOCTO #3299]

(From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3)

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>
2013-03-12 18:33:27 +00:00
Kang Kai c2fefcdc18 rootfs_rpm: move run-postinsts scripts to rpm recipe
Move run-postinsts scripts from rootfs_rpm.bbclass to rpm recipe. That
is the same way for dpkg and opkg to deal the post install scripts.

(From OE-Core rev: 04607b0cd496837f10ef78cf43597ec1d2e13f2e)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:26 +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
Laurentiu Palcu 5bb362a0ba rootfs_(ipk|deb|rpm).bbclass: check package installation status after ROOTFS_POSTPROCESS_COMMAND
Since the intercept fall-back procedure will change the package
installation status, do the checking after ROOTFS_POSTPROCESS_COMMAND
ends.

(From OE-Core rev: 414c3918baccc2166bba536c956eebaeb49aace3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Saul Wold 96180955d0 rootfs_rpm: Escape the backtick to ensure the ls runs on the target
This change ensures that the ls /etc/rpm-postinsts runs in the target
at first boot time, rather than at the creation time of the script on
the host.

This was causing the following error in the rootfs log:

+ install -d /srv/ssd/sgw/machines/fri2/tmp/work/fri2-poky-linux/core-image-minimal/1.0-r0/rootfs//etc/rcS.d
+ i=
+ ls /etc/rpm-postinsts/
ls: cannot access /etc/rpm-postinsts/: No such file or directory

(From OE-Core rev: e893cf0b3843701e80f5c9f47be04d1a88e5ed68)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 00:03:01 +00:00
Chen Qi bd10a6d257 rootfs_rpm.bbclass: fix the unexpected postinst error
If the /etc/rpm-postinsts/ directory was empty, the following error
would occur at system startup.

      ERROR: postinst /etc/rpm-postinsts/* failed

This patch fixes this issue.

[YOCTO #3767]

(From OE-Core rev: 202263aeca837dc7b6615a3dc34569c199163733)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:54:34 +00:00
Paul Eggleton 8ca0d592c5 classes/rootfs_*: error out if postinstalls exist with read-only rootfs
If there are postinstall scripts to be run on first boot and
IMAGE_FEATURES contains "read-only-rootfs", we know this will fail on
the target device so just error out during do_rootfs. This check was
already implemented for ipk, so add it to the deb and rpm backends. Also
make all backends use bberror rather than just echo to display the
error.

Fixes [YOCTO #3407].

(From OE-Core rev: 510e377f252dece8850487c30482f83df4a89c7e)

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>
2013-01-18 13:28:05 +00:00
Chen Qi 67e056a76a rootfs_rpm.bbclass: export INSTALL_PLATFORM_EXTRA_RPM
Export this variable because package_rpm.bbclass needs it.

[YOCTO #3682]

(From OE-Core rev: 64b01c6c945346b661f294fc8a49bf04a72da3c0)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-10 23:43:09 +00:00
Mark Hatle 90c0eb29f0 rootfs_rpm.bbclass: remove debug code
Debugging code was accidently left in the previous commit.  Remove
the code as it prevents multiple concurrent bitbake builds.

(From OE-Core rev: bbd55cc34ca893c7202634fe138cedb2f380be56)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 21:43:55 +00:00
Martin Jansa 5f2515667d rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs
* I have kernel recipe which depends on other recipe to build tiny initramfs
  image, without this change it rebuilds not only that initramfs image
  but also whole kernel when DATE or TIME is changed and OEBasicHash enabled
* also resolves ERROR shown when bitbake -S is used for image:
  ERROR: Bitbake's cached basehash does not match the one we just generated
  (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
  ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

(From OE-Core rev: a78d2d21fffd646a0d6e0f02a8355be010a7bd28)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:54:51 +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 2997a704fc classes/rootfs_rpm: install smart instead of zypper in rpm-based images
Switch over to smart on the target when package-management is enabled.

(From OE-Core rev: 69f258a2422e6a6ae71834dd097ffa00a1784d9e)

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-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
Mark Hatle 1f476dbb22 rootfs_rpm.bbclass: Revert to default shell logging behavior
Remove the set +x, and revert to the normal logging behavior.

(From OE-Core rev: e799d771c9ed9e41a900e2e96c23d4ae35d5fe08)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:46 +00:00
Ming Liu 8880840f36 rootfs_rpm.bbclass: fix a regression introduced by list_installed_packages change
A regression was introduced by commit:190cb591 that it doesn't
consider the situation that some archs contain "_" originally, so it
results in issues when dealing with archs like qemux86_64, x85_64.

Added a conditional statment in to handle that case.

(From OE-Core rev: 8567991639fda8d2a1e88169b86c72e14cc6c82d)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:55 +00:00
Ming Liu 48e657f654 rootfs_rpm.bbclass: normalize arch output of list_installed_packages
list_installed_packages should output uniform formatted archs for all
packaging system(deb, rpm and ipk), for they are used by common code to
grab the package infos. Otherwise, it will lead some -dbg packages to be
missed processing in come cases.

It's introduced by commit: fc985f51, package_rpm.bbclass: fix the arch
(replace "-" with "_").

Fixed by replacing "_" back to "-" in list_installed_packages, make it
output real arch values which can be safely used.

(From OE-Core rev: 554f2436435bf96c6735827f491c1b78b198c016)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 13:52:07 +00:00
Robert Yang 553d9dbe0e rootfs_rpm.bbclass: maybe no rpm postinst script
There maybe no rpm postinst script (e.g., core-image-minimal), then the
"*" is not expanded, and there would be error:

head: cannot open `rpm-postinsts/*' for reading: No such file or directory

Check whether it exists or not will fix the problem.

[YOCTO #3172]

(From OE-Core rev: 966c72e00c8d378d7d189f0e4b626f6782d23a25)

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-10-24 12:50:46 +01:00
Saul Wold 1c0f73b071 rootfs_rpm: Add Multilib prefix to installed_packages list
RPM does not name it's packages with the Multilib prefix,
but the rootfs_rpm class keeps track of the Multilib prefixs
in a list. Use that list to re-attach the prefix for use with
the license bbclass, buildhistory bbclass will also use this
and make it more accurate between multilib and non-multilib.
Use the embedded "Platform" information to ensure we get all
the correct matching.

(From OE-Core rev: f72abd80b0cc9d27aad2e31ecb548b4ab0fd8f67)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-19 18:16:16 +01:00
Paul Eggleton 1ce0f3f867 rpmresolve: improve debug output
Rename rpmresolve's -d option to -t and make -d enable debug output;
add a -o option to specify the output file (so rpm debug output doesn't
go to the output file) and also add a little more detail to some of the
error messages.

(From OE-Core rev: 163dd734d79fd7040b48b10bca6fde28460ac20c)

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-08-15 14:26:43 +01:00
Robert Yang 148e19e880 createrepo 0.4.11: add rpm-createsolvedb.py
Move scripts/rpm-createsolvedb.py to
meta/recipes-support/createrepo/createrepo/ since we should wrap it to
use the native python.

[YOCTO #2822]

(From OE-Core rev: 72d673bef385e756bd858f9eca7fe419efaceb39)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-01 23:11:17 +01:00
Paul Eggleton 20ad566d60 buildhistory: improve performance of image info collection
Reduce the number of calls to the packaging tool, especially in the case
of rpm, using helper utilities to gather the required information more
efficiently where possible.

(From OE-Core rev: d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:15 +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
Paul Eggleton a73c25d2de classes/rootfs_rpm: improve speed of RPM rootfs construction
Improve the performance of the RPM backend during do_rootfs by
performing most of the package name to file resolution in a separate
utility written in C, processing the entire list of packages at once
rather than running rpm on the command line which loads the RPM database
for every package.

(From OE-Core rev: 9135d351ba7cb21e50239d2b310565680bd4fdca)

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 43dd3512aa rootfs_rpm.bbclass: Update database configuration file
Move the creation of the database configuration files to just before we
perform the install actions.  This ensures they will exist even in SDK or
other non-target filesystem images.

(From OE-Core rev: 113e015afd46e46c9ba0413ca15f0316fa2eec24)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-12 11:10:35 +01:00
Mark Hatle b2381b63b9 rpm: Upgrade RPM to 5.4.8 (db to 5.3.15)
RPM 5.4.8 requires db 5.3.x, so both are upgraded together.

(From OE-Core rev: c5898ef3fc3820ff9c44bc5b1b16e5def64aa877)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-12 11:10:35 +01:00
Robert Yang ea2a85035a rootfs_rpm.bbclass: save rpmlib rather than remove it
The rpmlib was removed when images that add
"remove_packaging_data_files" to ROOTFS_POSTPROCESS_COMMAND, which would
make the increment rpm image generation doesn't work in the second
build, since list_installed_packages would get incorrect value in the
second build, move the rpmlib to ${T} rather than remove it, and move it
back when INC_RPM_IMAGE_GEN =1.

[YOCTO #2440]

(From OE-Core rev: c30e79510c06701f10f659eedaa0fe785538ac17)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:23 +01:00
Otavio Salvador f473660b5f rootfs_rpm.bbclass: rename postinst trigger script
Use 'run-postinsts' as trigger script name as it describes better the
intent of it.

(From OE-Core rev: 6bc50e531a15728be019af7bec5bce704fb72f8f)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13 11:45:09 +00:00