<?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>6481</bug_id>
          
          <creation_ts>2014-06-25 23:44:44 +0000</creation_ts>
          <short_desc>wic produces traceback</short_desc>
          <delta_ts>2014-07-15 15:46:22 +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>configuration</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>major</bug_severity>
          <target_milestone>1.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Phlip Balister">philip</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44191</commentid>
    <comment_count>0</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-06-25 23:44:44 +0000</bug_when>
    <thetext>I run:

wic create ~/wic/XXXX-sd.wks -o ~/wic/out -e uhd-dev-image

I see:

Checking basic build environment...
Done.

Creating image(s)...

Traceback (most recent call last):
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 262, in &lt;module&gt;
    ret = main()
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 257, in main
    invoke_subcommand(args, parser, wic_help_usage, subcommands)
  File &quot;/home/balister/oe-core/oe-core/scripts/lib/image/help.py&quot;, line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 201, in wic_create_subcommand
    image_output_dir, options.debug, options.properties_file)
  File &quot;/home/balister/oe-core/oe-core/scripts/lib/image/engine.py&quot;, line 244, in wic_create
    cr.main(direct_args)
TypeError: &apos;NoneType&apos; object has no attribute &apos;__getitem__&apos;

The wks file is:

# short-description: Create the iot-devkit disk image
# long-description: Creates the partitioned disk image that the user
# can directly dd to the sdcard.

part /boot --source iot-devkit --size 50 --ondisk mmcblkp0 --fstype=msdos --label FAT --active --align 1024

# this assumes that your SD card is 7.05GB+
part / --source rootfs --size 1000 --ondisk mmcblkp0 --fstype=ext4 --label rootfs --align 1024

I realize I do not know what I am doing, but there isn&apos;t anything in the traceback to help me fix the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44199</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-06-26 11:53:42 +0000</bug_when>
    <thetext>Right, and it&apos;s not obvious to me what&apos;s wrong either - I&apos;ll need to build an image and try it myself.

It would be useful to reproduce using the same build artifacts i.e. uhd-dev-image, so if possible could you provide the layers/layer information you used?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44204</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2014-06-26 14:50:41 +0000</bug_when>
    <thetext>Philip, what version of oe-core are you using? I&apos;m sure I&apos;ve seen this before in the past.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44210</commentid>
    <comment_count>3</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-06-26 17:12:07 +0000</bug_when>
    <thetext>uhd-dev-image is in meta-sdr at:

https://github.com/balister/meta-sdr

I&apos;ll run a core-image and try that.

I am running a very recent oe-core:

commit 01968e9244d0cf3deb1ec5cfb8e562d3b364add6
Author: Cristian Iorga &lt;cristian.iorga@intel.com&gt;
Date:   Fri Jun 20 18:42:20 2014 +0300</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44211</commentid>
    <comment_count>4</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2014-06-26 17:19:28 +0000</bug_when>
    <thetext>[balister@mattsbaby build]$ wic create ~/wic/e300-sd.wks -o ~/wic/out -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Traceback (most recent call last):
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 262, in &lt;module&gt;
    ret = main()
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 257, in main
    invoke_subcommand(args, parser, wic_help_usage, subcommands)
  File &quot;/home/balister/oe-core/oe-core/scripts/lib/image/help.py&quot;, line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File &quot;/home/balister/oe-core/oe-core/scripts/wic&quot;, line 201, in wic_create_subcommand
    image_output_dir, options.debug, options.properties_file)
  File &quot;/home/balister/oe-core/oe-core/scripts/lib/image/engine.py&quot;, line 244, in wic_create
    cr.main(direct_args)
TypeError: &apos;NoneType&apos; object has no attribute &apos;__getitem__&apos;
[balister@mattsbaby build]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44225</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-06-27 13:39:43 +0000</bug_when>
    <thetext>So the problem is that there isn&apos;t an iot-devkit wic source plugin in oe-core - this was a special plugin for the iot-devkit distro if I remember.

If there was an error message (and there will be shortly - I&apos;ll be working on this immediately), it would say something like, &quot;The &apos;iot-devkit&apos; 
source plugin specified as the --source of content for the /boot partitition, doesn&apos;t exist.  You should either add a source plugin with that name (see &apos;wic help plugins&apos; for details on how to do that) or reference an existing plugin in your kickstart file (see &apos;wic help kickstart&apos; for information on how to list and use available source plugins from your .wks file).

Obviously the documentation mentioned above doesn&apos;t exist in that form - I need to add some new sections to the in-tool documentation for that.  The closest we have right now on how to add plugins is here:

http://lists.openembedded.org/pipermail/openembedded-core/2014-February/089164.html

And for figuring out which plugins are available, the easiest way is to look at the implementation of the existing &apos;canned images&apos; which you can list using &apos;wic list images&apos;.  The location of the canned images listed there is scripts/lib/image/canned-wks.  From those, the current set of --sources available in oe-core are: bootimg-pcbios, bootimg-efi and rootfs.  There&apos;s some documentation about the canned images and other things here, which is out-of-date and really needs to be incorporated into the in-tool documentation and updated along with the tool. 

http://www.yoctoproject.org/docs/1.5.2/dev-manual/dev-manual.html#creating-partitioned-images</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44382</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-07-08 14:54:29 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; So the problem is that there isn&apos;t an iot-devkit wic source plugin in
&gt; oe-core - this was a special plugin for the iot-devkit distro if I remember.
&gt; 
&gt; If there was an error message (and there will be shortly - I&apos;ll be working
&gt; on this immediately), it would say something like, &quot;The &apos;iot-devkit&apos; 
&gt; source plugin specified as the --source of content for the /boot
&gt; partitition, doesn&apos;t exist.  You should either add a source plugin with that
&gt; name (see &apos;wic help plugins&apos; for details on how to do that) or reference an
&gt; existing plugin in your kickstart file (see &apos;wic help kickstart&apos; for
&gt; information on how to list and use available source plugins from your .wks
&gt; file).
&gt; 
&gt; Obviously the documentation mentioned above doesn&apos;t exist in that form - I
&gt; need to add some new sections to the in-tool documentation for that.  The
&gt; closest we have right now on how to add plugins is here:
&gt; 
&gt; http://lists.openembedded.org/pipermail/openembedded-core/2014-February/
&gt; 089164.html
&gt; 
&gt; And for figuring out which plugins are available, the easiest way is to look
&gt; at the implementation of the existing &apos;canned images&apos; which you can list
&gt; using &apos;wic list images&apos;.  The location of the canned images listed there is
&gt; scripts/lib/image/canned-wks.  From those, the current set of --sources
&gt; available in oe-core are: bootimg-pcbios, bootimg-efi and rootfs.  There&apos;s
&gt; some documentation about the canned images and other things here, which is
&gt; out-of-date and really needs to be incorporated into the in-tool
&gt; documentation and updated along with the tool. 
&gt; 
&gt; http://www.yoctoproject.org/docs/1.5.2/dev-manual/dev-manual.html#creating-
&gt; partitioned-images

Patchset submitted to oe-core addressing the above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44496</commentid>
    <comment_count>7</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-07-15 15:46:22 +0000</bug_when>
    <thetext>Fix along with related items pulled into oe-core:

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

    </bug>

</bugzilla>