diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-08-11 19:23:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-12 17:11:24 +0100 |
commit | 4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6 (patch) | |
tree | 02fbfb0063b2921a2930f9d70f501b4f9a8e8bc5 | |
parent | 4de2ba0eeaefbd6813443c6906108b815af9e109 (diff) | |
download | openembedded-core-4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6.tar.gz openembedded-core-4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6.tar.bz2 openembedded-core-4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6.zip |
package_rpm: Fix attemptonly and suggest packages
[YOCTO #1325] [YOCTO #1366]
Packages that were in the PACKAGE_ATTEMPTONLY and SUGGESTS were not
being properly found, which was causing image creation failures.
In PACKAGE_ATTEMPTONLY, when an item was not found, it caused an
error. This should have been a note, followed by skipping the
package.
The SUGGESTS processing was simply broken. It was using a
non-existant function, due to an apparently typo.
In addition to the above, the MLPREFIX processing was not being
done properly, preventing multilib packages from working in this
with PACKAGE_ATTEMPTONLY. (SUGGESTS doesn't need this as the names
are munged when creating the packages.)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r-- | meta/classes/package_rpm.bbclass | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 5c67f69bb9..b15786d165 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -257,10 +257,16 @@ package_install_internal_rpm () { echo "Adding attempt only packages..." for pkg in ${package_attemptonly} ; do echo "Processing $pkg..." - pkg_name=$(resolve_package_rpm $pkg ${confbase}.conf) + archvar=base_archs + ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") + if [ "${ml_pkg}" != "${pkg}" ]; then + archvar=ml_archs + fi + + pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) if [ -z "$pkg_name" ]; then - echo "Unable to find package $pkg!" - exit 1 + echo "Note: Unable to find package $pkg ($ml_pkg) -- PACKAGE_INSTALL_ATTEMPTONLY" + continue fi echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \ @@ -297,8 +303,17 @@ package_install_internal_rpm () { # Ohh there was a new one, we'll need to loop again... loop=1 echo "Processing $pkg..." - pkg_name=$(resolve_package $pkg ${confbase}.conf) - if [ -z "$pkg_name" ]; then + found=0 + for archvar in base_archs ml_archs ; do + pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${pkg}) + if [ -n "$pkg_name" ]; then + found=1 + break + fi + done + + if [ $found -eq 0 ]; then + echo "Note: Unable to find package $pkg -- suggests" echo "Unable to find package $pkg." >> "${WORKDIR}/temp/log.do_${task}_recommend.${PID}" continue fi |