<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3482</bug_id>
          
          <creation_ts>2012-11-23 09:40:29 +0000</creation_ts>
          <short_desc>A lot of -dbg packages don&apos;t get installed on beagleboard platform</short_desc>
          <delta_ts>2012-12-05 07:56:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ming Liu">ming.liu</reporter>
          <assigned_to name="Ming Liu">ming.liu</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27642</commentid>
    <comment_count>0</comment_count>
      <attachid>948</attachid>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-11-23 09:40:29 +0000</bug_when>
    <thetext>Created attachment 948
0001-rootfs_rpm.bbclass-normalize-arch-output-of-list_ins.patch

Add the following to the local.conf:
    MACHINE ?= &quot;beagleboard&quot;

    EXTRA_IMAGE_FEATURES += &quot;dbg-pkgs&quot;

    IMAGE_INSTALL_append += &quot;which&quot;
    IMAGE_INSTALL_append += &quot;grep&quot;
    IMAGE_INSTALL_append += &quot;sed&quot;
    IMAGE_INSTALL_append += &quot;gawk&quot;

After compiling, noticed that all -dbg packages of above appended not got installed into the filesystem. (e.g. which.which is supposed to be in /usr/bin/.debug but not).

This is caused by function list_installed_packages defined in rootfs_rpm.bbclass is outputting wrong arch values(&quot;-&quot; replaced by &quot;_&quot;), which then results in oe-pkgdata-util script missed processing some complementary packages with these wrong archs.  

And as observed, this also causes license information missing of specific packages.

This defect is introduced by: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4a015e57ccee4fec8ab1da6717f4e2d5c4bb9ff5

Attached patch fixes it upon my test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27840</commentid>
    <comment_count>1</comment_count>
      <attachid>948</attachid>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-11-30 01:00:05 +0000</bug_when>
    <thetext>Comment on attachment 948
0001-rootfs_rpm.bbclass-normalize-arch-output-of-list_ins.patch

&gt;From 59b5bbf7aae994e42bf82a3629a7536429dc0226 Mon Sep 17 00:00:00 2001
&gt;From: Ming Liu &lt;ming.liu@windriver.com&gt;
&gt;Date: Fri, 23 Nov 2012 16:32:23 +0800
&gt;Subject: [PATCH] rootfs_rpm.bbclass: normalize arch output of
&gt; list_installed_packages
&gt;
&gt;list_installed_packages should output uniform formatted archs for all
&gt;packaging system(deb, rpm and ipk), for they are used by common code to
&gt;grab the package infos. Otherwise, it will lead some -dbg packages to be
&gt;missed processing in come cases.
&gt;
&gt;It&apos;s introduced by commit: fc985f51, package_rpm.bbclass: fix the arch
&gt;(replace &quot;-&quot; with &quot;_&quot;).
&gt;
&gt;Fixed by replacing &quot;_&quot; back to &quot;-&quot; in list_installed_packages, make it
&gt;output real arch values which can be safely used.
&gt;
&gt;Signed-off-by: Ming Liu &lt;ming.liu@windriver.com&gt;
&gt;---
&gt; meta/classes/rootfs_rpm.bbclass |    2 +-
&gt; 1 file changed, 1 insertion(+), 1 deletion(-)
&gt;
&gt;diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
&gt;index c86cd09..300dd5f 100644
&gt;--- a/meta/classes/rootfs_rpm.bbclass
&gt;+++ b/meta/classes/rootfs_rpm.bbclass
&gt;@@ -153,7 +153,7 @@ list_installed_packages() {
&gt; 
&gt; 	# print the info, need to different return counts
&gt; 	if [ &quot;$1&quot; = &quot;arch&quot; ] ; then
&gt;-		echo &quot;$GET_LIST&quot; | awk &apos;{print $1, $2}&apos;
&gt;+		echo &quot;$GET_LIST&quot; | awk -v archs=&quot;${PACKAGE_ARCHS}&quot; &apos;{if(!index(archs, $2)) {gsub(&quot;_&quot;, &quot;-&quot;, $2)} print $1, $2}&apos;
&gt;         elif [ &quot;$1&quot; = &quot;file&quot; ] ; then
&gt; 		echo &quot;$GET_LIST&quot; | awk &apos;{print $1, $3}&apos;
&gt;         else
&gt;-- 
&gt;1.7.10.1
&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27841</commentid>
    <comment_count>2</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-11-30 01:14:29 +0000</bug_when>
    <thetext>The attached patch will introduce another issue when dealing with qemux86_64 or x86_64 platforms, which the regression fix provided in Comment 1, so pls reference it as the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27979</commentid>
    <comment_count>3</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-12-05 07:56:23 +0000</bug_when>
    <thetext>Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8880840f36fcb53342c6700a4144511ff439a3e3</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>948</attachid>
            <date>2012-11-23 09:40:29 +0000</date>
            <delta_ts>2012-11-30 01:00:05 +0000</delta_ts>
            <desc>0001-rootfs_rpm.bbclass-normalize-arch-output-of-list_ins.patch</desc>
            <filename>0001-rootfs_rpm.bbclass-normalize-arch-output-of-list_ins.patch</filename>
            <type>text/plain</type>
            <size>1381</size>
            <attacher name="Ming Liu">ming.liu</attacher>
            
              <data encoding="base64">RnJvbSA1OWI1YmJmN2FhZTk5NGU0MmJmODJhMzYyOWE3NTM2NDI5ZGMwMjI2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNaW5nIExpdSA8bWluZy5saXVAd2luZHJpdmVyLmNvbT4KRGF0
ZTogRnJpLCAyMyBOb3YgMjAxMiAxNjozMjoyMyArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIHJvb3Rm
c19ycG0uYmJjbGFzczogbm9ybWFsaXplIGFyY2ggb3V0cHV0IG9mCiBsaXN0X2luc3RhbGxlZF9w
YWNrYWdlcwoKbGlzdF9pbnN0YWxsZWRfcGFja2FnZXMgc2hvdWxkIG91dHB1dCB1bmlmb3JtIGZv
cm1hdHRlZCBhcmNocyBmb3IgYWxsCnBhY2thZ2luZyBzeXN0ZW0oZGViLCBycG0gYW5kIGlwayks
IGZvciB0aGV5IGFyZSB1c2VkIGJ5IGNvbW1vbiBjb2RlIHRvCmdyYWIgdGhlIHBhY2thZ2UgaW5m
b3MuIE90aGVyd2lzZSwgaXQgd2lsbCBsZWFkIHNvbWUgLWRiZyBwYWNrYWdlcyB0byBiZQptaXNz
ZWQgcHJvY2Vzc2luZyBpbiBjb21lIGNhc2VzLgoKSXQncyBpbnRyb2R1Y2VkIGJ5IGNvbW1pdDog
ZmM5ODVmNTEsIHBhY2thZ2VfcnBtLmJiY2xhc3M6IGZpeCB0aGUgYXJjaAoocmVwbGFjZSAiLSIg
d2l0aCAiXyIpLgoKRml4ZWQgYnkgcmVwbGFjaW5nICJfIiBiYWNrIHRvICItIiBpbiBsaXN0X2lu
c3RhbGxlZF9wYWNrYWdlcywgbWFrZSBpdApv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