<?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>5127</bug_id>
          
          <creation_ts>2013-09-05 10:43:19 +0000</creation_ts>
          <short_desc>base.bbclass: do_unpack failed for *.xz files if xz is not installed on host</short_desc>
          <delta_ts>2013-09-12 06:43:37 +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>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.5 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jackie Huang">jackie.huang</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36326</commentid>
    <comment_count>0</comment_count>
    <who name="Jackie Huang">jackie.huang</who>
    <bug_when>2013-09-05 10:43:19 +0000</bug_when>
    <thetext>In base.bbclass, we have:
# *.xz should depends on xz-native for unpacking
# Not endswith because of &quot;*.patch.xz;patch=1&quot;. Need bb.decodeurl in future
if &apos;.xz&apos; in srcuri:
d.appendVarFlag(&apos;do_unpack&apos;, &apos;depends&apos;, &apos; xz-native:do_populate_sysroot&apos;)

But looks like it&apos;s not working.

If xz is not installed on the host and I do:
1) $ bitbake -c cleansstate xz-native
2) $ bitbake -c unpack gstreamer1.0-plugins-base

It will always fail with:

ERROR: Function failed: Unpack failure for URL: &apos;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.9.tar.xz&apos;. Unpack command PATH=&quot;/buildarea/jhuang0/git/yocto/poky/scripts:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/bin/x86_64-poky-linux:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/qemux86-64/usr/bin/crossscripts:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/sbin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/bin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/sbin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux//bin:/buildarea/jhuang0/git/yocto/poky/scripts:/buildarea/jhuang0/git/yocto/poky/bitbake/bin:/folk/jhuang0/bin:/folk/jhuang0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games&quot; xz -dc /buildarea/jhuang0/yp/downloads/gst-plugins-base-1.0.9.tar.xz | tar x --no-same-owner -f - failed with return value 2
ERROR: Logfile of failure stored in: /buildarea/jhuang0/yp/y_x64_0705/tmp/work/x86_64-poky-linux/gstreamer1.0-plugins-base/1.0.9-r0/temp/log.do_unpack.8305
Log data follows:
| DEBUG: Executing python function do_unpack
| DEBUG: Executing python function base_do_unpack
| NOTE: Unpacking /buildarea/jhuang0/yp/downloads/gst-plugins-base-1.0.9.tar.xz to /buildarea/jhuang0/yp/y_x64_0705/tmp/work/x86_64-poky-linux/gstreamer1.0-plugins-base/1.0.9-r0/
| /bin/sh: xz: command not found
| tar: This does not look like a tar archive
| tar: Exiting with failure status due to previous errors
| DEBUG: Python function base_do_unpack finished
| DEBUG: Python function do_unpack finished
| ERROR: Function failed: Unpack failure for URL: &apos;http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.9.tar.xz&apos;. Unpack command PATH=&quot;/buildarea/jhuang0/git/yocto/poky/scripts:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/bin/x86_64-poky-linux:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/qemux86-64/usr/bin/crossscripts:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/sbin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/usr/bin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux/sbin:/buildarea/jhuang0/yp/y_x64_0705/tmp/sysroots/x86_64-linux//bin:/buildarea/jhuang0/git/yocto/poky/scripts:/buildarea/jhuang0/git/yocto/poky/bitbake/bin:/folk/jhuang0/bin:/folk/jhuang0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games&quot; xz -dc /buildarea/jhuang0/yp/downloads/gst-plugins-base-1.0.9.tar.xz | tar x --no-same-owner -f - failed with return value 2
NOTE: recipe gstreamer1.0-plugins-base-1.0.9-r0: task do_unpack: Failed
ERROR: Task 0 (/buildarea/jhuang0/git/yocto/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.0.9.bb, do_unpack) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /buildarea/jhuang0/git/yocto/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.0.9.bb, do_unpack
Summary: There was 1 ERROR message shown, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36436</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-09-09 17:24:36 +0000</bug_when>
    <thetext>I can reproduce this with xz, but if I try unzip it works correctly, so it  
seems to be specific to xz.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36567</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-09-11 23:26:24 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=82914e5dfb4ec362ffa2dc683a247b60ab4481af</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36585</commentid>
    <comment_count>3</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-09-12 06:43:37 +0000</bug_when>
    <thetext>Verified on master branch.
Commit ID: 40232ed397a586a520ce6ef6e005d4db336ace03</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>