The Hob image writer should be broken out as a separate application that Hob calls. This would enable use of this image writer independently from Hob when users have an image and no build environment. It's also unfortunate to have to parse recipes and build pseudo just to write an image. ddimage provides a workaround, but for the GUI folks, this would be a boon.
Kai, can you help to separate the deploy dialog from Hob into an app and then Hob to call the app to deploy images?
ok,I'll take it.
(In reply to comment #1) > Kai, can you help to separate the deploy dialog from Hob into an app and > then Hob to call the app to deploy images? How about create a gui tool using the existing codes without separate them?
Mostly just basic UNIX philosophy: Do one thing and do it well. What would the advantage be of not separating the tool?
The deploy dialog is already a independent class.
That doesn't really answer the question for me. There is a distinct advantage of having a GUI tool to write images we create that can be deployed as a single file that people can run without pulling in all of the bitbake API code or even the rest of the Hob UI (even if they don't load it). If the image writer class is indeed self sufficient, then adding a python main block which allows it to run standalone, then this is a good plan. e.g. # just pseudocode, surely complete wrong class names, gtk api, etc. It's the "if __name__" bit that is relevant: class DiskWriterUI(object): ... def main(): ui = DiskWriterUI() # validate arguments gtk.main() if __name__ == "__main__": main()
Patch merged,but need new patches to tweak string issues.
Strings issues are fixed.
I have tried the following : 1. plug a usb device to my pc machine 2. run "path_to_git/poky/bitbake/bin/image-writer" Can choose a ext3 file and select the usb drive and chose "Write USB image",after type root passwd and wait and can get success info (Deploy images successfully). then can get the extracted rootfs info from the usb device. some warning messages met from the terminal during test: maybe sometimes following info : /home/liangli/test_poky_git_43/poky/bitbake/lib/bb/ui/crumbs/hig.py:872: RuntimeWarning: tmpnam is a potential security risk to your program tmpname = os.tmpnam() maybe that would be no helpful to user. git info: 4f65868ea56695177212ebe4b357b6e1d010e483 git branch: poky/master test env: host : ubuntu 12.04 x86_64 kernel: 3.2.0-25-generic #40-Ubuntu SMP
(In reply to comment #9) > some warning messages met from the terminal during test: > > maybe sometimes following info : > /home/liangli/test_poky_git_43/poky/bitbake/lib/bb/ui/crumbs/hig.py:872: > RuntimeWarning: tmpnam is a potential security risk to your program > tmpname = os.tmpnam() The preferred temp file mechansim is now tempfile: from tempfile import * f = NamedTemporaryFile(...) http://docs.python.org/library/tempfile.html Available since python 2.3
(In reply to comment #10) > (In reply to comment #9) > > > some warning messages met from the terminal during test: > > > > maybe sometimes following info : > > /home/liangli/test_poky_git_43/poky/bitbake/lib/bb/ui/crumbs/hig.py:872: > > RuntimeWarning: tmpnam is a potential security risk to your program > > tmpname = os.tmpnam() > > The preferred temp file mechansim is now tempfile: > > from tempfile import * > f = NamedTemporaryFile(...) > > http://docs.python.org/library/tempfile.html > > Available since python 2.3 Thanks. I'll fix it.