Bug 6550

Summary: Error when installing Kernelshark on intel-core2-32 machine with RPM package class
Product: [Build System, Metadata & Runtime] OE-Core Reporter: California Sullivan <california.l.sullivan>
Component: coreAssignee: Darren Hart <dvhart>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, meta.mr.watcher, meta.watcher
Version: 1.6.1   
Target Milestone: 1.6.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: No (bug/feature does not impact docs)

Description California Sullivan 2014-07-17 21:59:28 UTC
Committing transaction...
Preparing...                    ######################################## [  0%]
error: file /usr/bin/trace-cmd conflicts between attempted installs of kernelshark-1.2+git0+7055ffd37b-r3.core2_32 and trace-cmd-1.2+git0+7055ffd37b-r3.core2_32

Only found when MACHINE = "intel-core2-32" and PACKAGE_CLASSES = "package_rpm".
Changing MACHINE to "intel-corei7-64" or PACKAGE_CLASSES to "package_ipk" allows the build to complete successfully.
Comment 1 Darren Hart 2014-07-18 23:06:01 UTC
Patch submitted to oe-core. The problem was that if you try to install both kernelshark and trace-cmd, they both have packaged trace-cmd. I can't explain why this only appeared on one machine for Cal, but this did reproduce for me on intel-corei7-64 too.

A simple fix is just to remove trace-cmd from the install prior to packaging. It is maybe a little crude, but it's simple and consistent with the current do_install() task which already removes the datadir.

diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
index d61097d..f287bed 100644
--- a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
+++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
@@ -25,6 +25,7 @@ FILESPATH = "${FILE_DIRNAME}/trace-cmd"

 do_install() {
        oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui
+       rm ${D}${bindir}/trace-cmd
        rm -rf ${D}${datadir}/trace-cmd
        rmdir ${D}${datadir}
 }
Comment 2 Darren Hart 2014-07-18 23:09:29 UTC
I think this would be appropriate for daisy as well.
Comment 3 Darren Hart 2014-07-21 20:51:18 UTC
Fixed in master:
commit 5be57ba62b47f12f937b2e1e0f5ea07092c243d8
Author: Darren Hart <dvhart@linux.intel.com>
Date:   2014-07-18

    kernelshark: Remove trace-cmd from the kernelshark package