Bug 2795 - hob2: remove the hardcoded map between image types and real image extend name
Summary: hob2: remove the hardcoded map between image types and real image extend name
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3 M4
Assignee: Kai Kang
QA Contact:
URL:
Whiteboard: (QA testing completed) Done
Depends on:
Blocks:
 
Reported: 2012-07-19 02:39 UTC by Kai Kang
Modified: 2012-09-10 09:06 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Kang 2012-07-19 02:39:37 UTC
Successor of Yocto 2709
When a new image type added, hob need to update the hardcoded map.
Avoid it.
Comment 1 Kai Kang 2012-09-10 06:33:56 UTC
Yocto commit: da98eddd02118f4330d05a1262617ba84029a13a
Comment 2 liang li 2012-09-10 09:06:31 UTC
when using git commit before da98eddd02118f4330d05a1262617ba84029a13a (commit:19ff55a53b436d463f9577adaed15be77708f0d2) and steps below:
1. bitbake core-image-minimal
2. in tmp/deploy/images , create a file "test.abc".
3. in file "path_to_git/meta/classes/image_types.bbclass" ,add new image types 'abc' as below:
IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf abc"
4. run "hob" and select "Images" button. 

from "Open My Images" window, "test" can not be found in the file lists,errors met in backend:

Traceback (most recent call last):
  File "/buildarea/poky.ubuntu.new/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py", line 431, in my_images_button_clicked_cb
    self.builder.show_load_my_images_dialog()
  File "/buildarea/poky.ubuntu.new/bitbake/lib/bb/ui/crumbs/builder.py", line 1120, in show_load_my_images_dialog
    gtk.FILE_CHOOSER_ACTION_SAVE)
  File "/buildarea/poky.ubuntu.new/bitbake/lib/bb/ui/crumbs/hig.py", line 1188, in __init__
    self.fill_image_store()
  File "/buildarea/poky.ubuntu.new/bitbake/lib/bb/ui/crumbs/hig.py", line 1268, in fill_image_store
    for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
KeyError: 'abc'
---------------------

when using poky master branch newest(after da98eddd02118f4330d05a1262617ba84029a13a) and the same steps as above:
from "Open My Images" window,"test" can be found in the file lists and can be opened, no error met in backend.

git info:5343cdb20ee56a8b507733c637dcc2466ae13288
git branch: poky/master
test env: ubuntu 12.04 x86_64