Bug 1366 - Adding packages via attempt only fails in package_rpm
Summary: Adding packages via attempt only fails in package_rpm
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: High normal
Target Milestone: 1.1
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-08-11 16:38 UTC by Saul Wold
Modified: 2011-08-12 10:43 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saul Wold 2011-08-11 16:38:57 UTC

    
Comment 1 Saul Wold 2011-08-11 16:53:58 UTC
The code in package_rpm for adding attempt only packages has not been updated to for the changes to resolve_package_rpm(), this change was due to the Chris Larson change that started to use ATTEMPTONLY.

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 5c67f69..a6da5fd 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -257,7 +257,14 @@ 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
Comment 2 Mark Hatle 2011-08-11 18:13:38 UTC
Patch is not complete.  I've sent an updated version.. (We were working on this in parallel without knowing it.)

The missing part of the fix attached to this defect is that the exit 1 should be a continue.

It's likely that this defect is related to 1325...
Comment 3 Saul Wold 2011-08-12 10:43:46 UTC
Thanks to Mark for the proper fix!

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=3e8a98489dddb3bfc26309adcf83434852238445