<?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>1507</bug_id>
          
          <creation_ts>2011-09-21 22:53:53 +0000</creation_ts>
          <short_desc>[deb][arm] core-image-sato-sdk do_rootfs failed: task-base-extended: Depends: task-base but it is not going to be installed</short_desc>
          <delta_ts>2011-09-22 16:05:01 +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>arm</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dexuan Cui">dexuan.cui</reporter>
          <assigned_to name="Dexuan Cui">dexuan.cui</assigned_to>
          <cc>dexuan.cui</cc>
    
    <cc>lianhao.lu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</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>16380</commentid>
    <comment_count>0</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-21 22:53:53 +0000</bug_when>
    <thetext>After Bug 1070  and Bug 1086 were fixed, on qemuarm, we actually still have an issue:

| + for i in &apos;${package_to_install}&apos;
| + apt-get install task-base-extended --force-yes --allow-unauthenticated
| Reading package lists...
| Building dependency tree...
| Reading state information...
| Some packages could not be installed. This may mean that you have
| requested an impossible situation or if you are using the unstable
| distribution that some required packages have not yet been created
| or been moved out of Incoming.
|
| Since you only requested a single operation it is extremely likely that
| the package is simply not installable and a bug report against
| that package should be filed.
| The following information may help to resolve the situation:
|
| The following packages have unmet dependencies:
|   task-base-extended: Depends: task-base but it is not going to be installed
| E: Broken packages
| + &apos;[&apos; 100 -ne 0 &apos;]&apos;
| + exit 1
NOTE: package core-image-sato-sdk-1.0-r0: task do_rootfs: Failed

This bug only happens on qemuarm  if we use deb packaging.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16382</commentid>
    <comment_count>1</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-21 23:05:12 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; After Bug 1070  and Bug 1086 were fixed, on qemuarm, we actually still have an
&gt; issue:
&gt; 
&gt; | + for i in &apos;${package_to_install}&apos;
&gt; | + apt-get install task-base-extended --force-yes --allow-unauthenticated
&gt; | Reading package lists...
&gt; | Building dependency tree...
&gt; | Reading state information...
&gt; | Some packages could not be installed. This may mean that you have
&gt; | requested an impossible situation or if you are using the unstable
&gt; | distribution that some required packages have not yet been created
&gt; | or been moved out of Incoming.
&gt; |
&gt; | Since you only requested a single operation it is extremely likely that
&gt; | the package is simply not installable and a bug report against
&gt; | that package should be filed.
&gt; | The following information may help to resolve the situation:
&gt; |
&gt; | The following packages have unmet dependencies:
&gt; |   task-base-extended: Depends: task-base but it is not going to be installed
&gt; | E: Broken packages
&gt; | + &apos;[&apos; 100 -ne 0 &apos;]&apos;
&gt; | + exit 1
&gt; NOTE: package core-image-sato-sdk-1.0-r0: task do_rootfs: Failed
&gt; 
&gt; This bug only happens on qemuarm  if we use deb packaging.

I finally got the root cause:
It&apos;s related to qemu-config.bb that uses a file
meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop, so in base.class:

override = bb.data.getVar(&apos;SRC_URI_OVERRIDES_PACKAGE_ARCH&apos;, d, 1)
    if override != &apos;0&apos;:
        paths = []
        for p in [ &quot;${PF}&quot;, &quot;${P}&quot;, &quot;${PN}&quot;, &quot;files&quot;, &quot;&quot; ]:
            path = bb.data.expand(os.path.join(&quot;${FILE_DIRNAME}&quot;, p, &quot;${MACHINE}&quot;), d)
            if os.path.isdir(path):
                paths.append(path)
        if len(paths) != 0:
            for s in srcuri.split():
                if not s.startswith(&quot;file://&quot;):
                    continue
                fetcher = bb.fetch2.Fetch([s], d)
                local = fetcher.localpath(s)
                for mp in paths:
                    if local.startswith(mp):
                        #bb.note(&quot;overriding PACKAGE_ARCH from %s to %s&quot; % (pkg_arch, mach_arch))
                        bb.data.setVar(&apos;PACKAGE_ARCH&apos;, &quot;${MACHINE_ARCH}&quot;, d)
                        return

After PACKAGE_ARCH is overridden from all to qemuarm, the generated deb file is stored at tmp/deploy/deb/qemuarm/qemu-config_1.0-r21_allarch.deb rather than  tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb, hence the package qemu-config is  not installable -- task-base finally rdepends on qemu-config, so we get the do_rootfs failure.

I think the below patch can fix the bug:

--- a/meta/recipes-bsp/qemu-config/qemu-config.bb
+++ b/meta/recipes-bsp/qemu-config/qemu-config.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = -PR = &quot;r21&quot;
+PR = &quot;r22&quot;
+
+SRC_URI_OVERRIDES_PACKAGE_ARCH = &quot;0&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16383</commentid>
    <comment_count>2</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-21 23:09:53 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; After Bug 1070  and Bug 1086 were fixed, on qemuarm, we actually still have an
&gt; &gt; issue:
&gt; &gt; This bug only happens on qemuarm  if we use deb packaging.
&gt; 
&gt; I finally got the root cause:
&gt; It&apos;s related to qemu-config.bb that uses a file
&gt; meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop, so in
&gt; base.class:
&gt; 
&gt; After PACKAGE_ARCH is overridden from all to qemuarm, the generated deb file is
&gt; stored at tmp/deploy/deb/qemuarm/qemu-config_1.0-r21_allarch.deb rather than 
&gt; tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb, hence the package qemu-config
&gt; is  not installable -- task-base finally rdepends on qemu-config, so we get the
&gt; do_rootfs failure.
&gt; 
&gt; I think the below patch can fix the bug:
&gt; 
&gt; --- a/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; +++ b/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = -PR = &quot;r21&quot;
&gt; +PR = &quot;r22&quot;
&gt; +
&gt; +SRC_URI_OVERRIDES_PACKAGE_ARCH = &quot;0&quot;

Previously I didn&apos;t always reproduce the bug because I didn&apos;t realized, to reproduce the bug, I need a clean build for qemuarm deb from scratch -- previously I usually built qemux86 deb first, and tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb was there, so later building qemuarm deb could succeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16391</commentid>
    <comment_count>3</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-22 01:42:21 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; (In reply to comment #0)
&gt; &gt; &gt; After Bug 1070  and Bug 1086 were fixed, on qemuarm, we actually still have an
&gt; &gt; &gt; issue:
&gt; &gt; &gt; This bug only happens on qemuarm  if we use deb packaging.
&gt; &gt; 
&gt; &gt; I finally got the root cause:
&gt; &gt; It&apos;s related to qemu-config.bb that uses a file
&gt; &gt; meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop, so in
&gt; &gt; base.class:
&gt; &gt; 
&gt; &gt; After PACKAGE_ARCH is overridden from all to qemuarm, the generated deb file is
&gt; &gt; stored at tmp/deploy/deb/qemuarm/qemu-config_1.0-r21_allarch.deb rather than 
&gt; &gt; tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb, hence the package qemu-config
&gt; &gt; is  not installable -- task-base finally rdepends on qemu-config, so we get the
&gt; &gt; do_rootfs failure.
&gt; &gt; 
&gt; &gt; I think the below patch can fix the bug:
&gt; &gt; 
&gt; &gt; --- a/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; &gt; +++ b/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; &gt; @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = -PR = &quot;r21&quot;
&gt; &gt; +PR = &quot;r22&quot;
&gt; &gt; +
&gt; &gt; +SRC_URI_OVERRIDES_PACKAGE_ARCH = &quot;0&quot;
&gt; 
&gt; Previously I didn&apos;t always reproduce the bug because I didn&apos;t realized, to
&gt; reproduce the bug, I need a clean build for qemuarm deb from scratch --
&gt; previously I usually built qemux86 deb first, and
&gt; tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb was there, so later building
&gt; qemuarm deb could succeed.

Thanks RP a lot for the suggestions how to make the patch, I sent out the fix to oe-core mailing list:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/bug-1507&amp;id=8ff7be8d70f27701840026ed3ba2431341b6508a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16424</commentid>
    <comment_count>4</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-22 16:05:01 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; (In reply to comment #0)
&gt; &gt; &gt; &gt; After Bug 1070  and Bug 1086 were fixed, on qemuarm, we actually still have an
&gt; &gt; &gt; &gt; issue:
&gt; &gt; &gt; &gt; This bug only happens on qemuarm  if we use deb packaging.
&gt; &gt; &gt; 
&gt; &gt; &gt; I finally got the root cause:
&gt; &gt; &gt; It&apos;s related to qemu-config.bb that uses a file
&gt; &gt; &gt; meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop, so in
&gt; &gt; &gt; base.class:
&gt; &gt; &gt; 
&gt; &gt; &gt; After PACKAGE_ARCH is overridden from all to qemuarm, the generated deb file is
&gt; &gt; &gt; stored at tmp/deploy/deb/qemuarm/qemu-config_1.0-r21_allarch.deb rather than 
&gt; &gt; &gt; tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb, hence the package qemu-config
&gt; &gt; &gt; is  not installable -- task-base finally rdepends on qemu-config, so we get the
&gt; &gt; &gt; do_rootfs failure.
&gt; &gt; &gt; 
&gt; &gt; &gt; I think the below patch can fix the bug:
&gt; &gt; &gt; 
&gt; &gt; &gt; --- a/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; &gt; &gt; +++ b/meta/recipes-bsp/qemu-config/qemu-config.bb
&gt; &gt; &gt; @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = -PR = &quot;r21&quot;
&gt; &gt; &gt; +PR = &quot;r22&quot;
&gt; &gt; &gt; +
&gt; &gt; &gt; +SRC_URI_OVERRIDES_PACKAGE_ARCH = &quot;0&quot;
&gt; &gt; 
&gt; &gt; Previously I didn&apos;t always reproduce the bug because I didn&apos;t realized, to
&gt; &gt; reproduce the bug, I need a clean build for qemuarm deb from scratch --
&gt; &gt; previously I usually built qemux86 deb first, and
&gt; &gt; tmp/deploy/deb/all/qemu-config_1.0-r21_all.deb was there, so later building
&gt; &gt; qemuarm deb could succeed.
&gt; 
&gt; Thanks RP a lot for the suggestions how to make the patch, I sent out the fix
&gt; to oe-core mailing list:
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/bug-1507&amp;id=8ff7be8d70f27701840026ed3ba2431341b6508a

Fixed by http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ca64b2eb1f1fd3b298e9384752b2fd806f7e4a12</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>