Bug 5313 - Some valid image configurations can not be made into SDK configurations
Summary: Some valid image configurations can not be made into SDK configurations
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5.1
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-03 20:39 UTC by Mark Hatle
Modified: 2014-02-24 10:14 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2013-10-03 20:39:30 UTC
When configuring an oe-core build adding the following line to the local.conf:

PACKAGE_CLASSES = "package_rpm"
IMAGE_INSTALL_append = "packagegroup-core-ssh-dropbear openssh-sftp-server"

The system ends up building properly, including ssh from dropbear, and an sftp-server from openssh.  There are no package conflicts in this.

When you either enable pkg-dev -- or try to build the SDK (which enables pkg-dev) a failure occurs when running through the 'attempt' install process with smart:

error: openssh-6.2p2-r0 requires openssh-scp
error: openssh-6.2p2-r0 requires openssh-ssh
error: openssh-6.2p2-r0 requires openssh-keygen
error: openssh-6.2p2-r0 requires openssh-sshd
error: packagegroup-core-ssh-dropbear-1.0-r1 requires dropbear

The attemptonly install process will then fail, causing the SDK (or image) generation to fail.
Comment 1 Mark Hatle 2013-10-03 20:41:02 UTC
Workaround for this issue:

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 05de1ff..98aa98b 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -478,7 +478,7 @@ EOF
                echo "Note: see `dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
                translate_oe_to_smart ${sdk_mode} --attemptonly $package_attemptonly
                echo "Attempting $pkgs_to_install" >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
-               smart --data-dir=${target_rootfs}/var/lib/smart install --attempt -y ${pkgs_to_install} >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1
+               smart --data-dir=${target_rootfs}/var/lib/smart install --attempt -y ${pkgs_to_install} >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || :
        fi
 }


This will workaround the problem by ignoring the --attempt install.  However, this is not the proper fix because it means certain components may not end up in the image or SDK.
Comment 2 Paul Eggleton 2013-10-04 13:06:33 UTC
The underlying cause of this is related to bug 5057, although this bug is really about smart being capable of ignoring the conflict when it comes to installing the complementary packages.
Comment 3 Paul Eggleton 2014-02-24 10:14:46 UTC
Fix merged to master:

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

This wasn't a trivial fix so I'd rather not backport this to dora for the moment, unless it's desperately needed. Please re-open if that's the case.