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:21:55 +0100 |
commit | 3e8a98489dddb3bfc26309adcf83434852238445 (patch) | |
tree | 1207ffbc0fffa0699178cae8475d22f6b2977f76 /meta/classes/package_rpm.bbclass | |
parent | 86504a12ad96b555a9a6b3d9b26a31ef7bf2732a (diff) | |
download | poky-3e8a98489dddb3bfc26309adcf83434852238445.tar.gz |
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.)
(From OE-Core rev: 4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-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 () { | |||
257 | echo "Adding attempt only packages..." | 257 | echo "Adding attempt only packages..." |
258 | for pkg in ${package_attemptonly} ; do | 258 | for pkg in ${package_attemptonly} ; do |
259 | echo "Processing $pkg..." | 259 | echo "Processing $pkg..." |
260 | pkg_name=$(resolve_package_rpm $pkg ${confbase}.conf) | 260 | archvar=base_archs |
261 | ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") | ||
262 | if [ "${ml_pkg}" != "${pkg}" ]; then | ||
263 | archvar=ml_archs | ||
264 | fi | ||
265 | |||
266 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) | ||
261 | if [ -z "$pkg_name" ]; then | 267 | if [ -z "$pkg_name" ]; then |
262 | echo "Unable to find package $pkg!" | 268 | echo "Note: Unable to find package $pkg ($ml_pkg) -- PACKAGE_INSTALL_ATTEMPTONLY" |
263 | exit 1 | 269 | continue |
264 | fi | 270 | fi |
265 | echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" | 271 | echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" |
266 | ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \ | 272 | ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \ |
@@ -297,8 +303,17 @@ package_install_internal_rpm () { | |||
297 | # Ohh there was a new one, we'll need to loop again... | 303 | # Ohh there was a new one, we'll need to loop again... |
298 | loop=1 | 304 | loop=1 |
299 | echo "Processing $pkg..." | 305 | echo "Processing $pkg..." |
300 | pkg_name=$(resolve_package $pkg ${confbase}.conf) | 306 | found=0 |
301 | if [ -z "$pkg_name" ]; then | 307 | for archvar in base_archs ml_archs ; do |
308 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${pkg}) | ||
309 | if [ -n "$pkg_name" ]; then | ||
310 | found=1 | ||
311 | break | ||
312 | fi | ||
313 | done | ||
314 | |||
315 | if [ $found -eq 0 ]; then | ||
316 | echo "Note: Unable to find package $pkg -- suggests" | ||
302 | echo "Unable to find package $pkg." >> "${WORKDIR}/temp/log.do_${task}_recommend.${PID}" | 317 | echo "Unable to find package $pkg." >> "${WORKDIR}/temp/log.do_${task}_recommend.${PID}" |
303 | continue | 318 | continue |
304 | fi | 319 | fi |