Commit Graph

39 Commits

Author SHA1 Message Date
Bogdan Marinescu 7bfb98568a bitbake: hig.py: refactor into individual components
Since hig.py was becoming too large (which impacted maintenance and
operations like git merges) it was split into individual files for
the classes that were implemented in hig.py. hig is now a Python
package (lib/bb/ui/crumbs/hig/). The patch was tested by
building core-image-basic/qemux86 in Hob and accessing the various
UI elements implemented in hig. Note that the patch does not change
the functionality of Hob in any way, it's just a code refactoring
that should make life a bit easier for Hob developers.

[YOCTO #3200]

(Bitbake rev: a7a2b730f915cafe7aa30539622dd1ca64ae41f5)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 12:51:33 +00:00
Cristiana Voicu e77f0570e8 bitbake: hob: modified how the existence of a variable is checked
(Bitbake rev: 4214ffff2c8a2a1fe66cbade03d2fd9e22a682d2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Cristiana Voicu f26d3e8d5f bitbake: hob: showing when build fails because out of disk space
-to enable this in hob, first you have to enable this in bitbake using
BB_DISKMON_DIRS and/or BB_DISKMON_WARNINTERVAL vars
-created "restart the build" action on the build_fail_top_bar

[YOCTO #3357]
(Bitbake rev: 964ac25d153ff4da144963289a32066db0e28b89)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Cristiana Voicu a9c563b1b5 bitbake: hob: add a progress indicator when you select 'view log'
- created a new file named "hobthreads.py", defining a thread
for opening the log file in a subprocess using subprocess module;
in the future I think we will add some other threads here, to
implement some other performance issues
- on "builddetailspage", "packageselectionpage" and "imagedetailspage"
I have changed the manner for opening the log file; it uses the thread
to open the file, and on main thread it creates a dialog to show a
progress bar, which pulses till the file is open
- this was added because when the log file is big, it takes time to
be opened; on the dialog you can use "Cancel" button to terminate the
process initiated to open the file

[YOCTO #2997]
(Bitbake rev: 165362a63f085991b6bab63ab90a0c7b9bf6b784)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Cristiana Voicu a975e6bb19 bitbake: hob/builddetailspage: set "Log" page as default
- when you do a build you should see "Log" page, not
"Build configuration" page

[YOCTO #2569]

(Bitbake rev: 431cb80d4d5222f832f6141b8578291f2f14a131)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Constantin Musca 1a85fc8f5b bitbake: hob/builddetailspage: fix failure_primary_action_button_clicked_cb
[YOCTO #3194]

(Bitbake rev: 660a449bdfd154fed556024f166e69c6931ff634)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 15:35:16 +01:00
Cristiana Voicu e2ac27c051 bitbake: hob/builddetailspage: remove "back" button
When a build fails, there should not be a back button on the screen.
All available actions are provided within the failure notification,
so no back button is needed.

[YOCTO #3104]
(Bitbake rev: 03f978d21c7bfbf5f1afc741a43766030f2882a8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 15:35:15 +01:00
Cristiana Voicu 6fdff49d9b bitbake: hob/builddetailspage: change branch field
When a user makes a build from a tarball, it shows fatal error in branch field.
Now it not complains as a fatal error. It is a normal message.

[YOCTO #3114]

(Bitbake rev: 53d5d542cd0197ca67c5f90a57808af2f19ff56d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Ioana Grigoropol 0e1a427a25 bitbake: hob: Buttons width and height are taken for host
- removed all set_size_request calls for buttons in order to:
	- force autosizing of buttons with regard to the text length
	- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text
- modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

(Bitbake rev: 9cdfaa17309d368c3bbae0f1cce0ad875d340e83)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Cristiana Voicu a0bdb64a18 bitbake: hob/builddetailspage: change tooltips and remove a dialog from "Build stopped" message
When you stop a build, a "Build stopped" message appears. I have changed 2 tooltips and
also eliminate the alert that comes up when you click 'Edit packages'.

[YOCTO #3160]
(Bitbake rev: f5a21da2faf7ede56cf211b96dffd8aaa4b485b8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 13:39:46 +01:00
Paul Eggleton 1c2634c8d2 bitbake: hob: fix Gtk-WARNINGs due to invalid markup on Back button
You can't use markup characters (e.g '<' or '>') in the labels for many
widgets - you must use the appropriate entities instead.

(Bitbake rev: 54a16ac999d4a2c4c3f8a4531e8c6fabc39a4147)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:51 +01:00
Cristiana Voicu c0c04a5404 bitbake: hob: add a top bar when building process is stopped
When a build was stopped, it wasn't obvious what to do next.
Now, on the page it appers a top bar with 3 buttons: "edit image",
"open log", "build new image"

[YOCTO #2537]
(Bitbake rev: a6afd15b7a40919313e26777b514ae44b587a0f6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 12:05:15 +01:00
Constantin Musca 293764e435 bitbake: hob/builddetailspage: Add tooltips to the build failed notification
[YOCTO #3046]

(Bitbake rev: 69ad4ebd1379e804d0753bd4ee704b602b5efcc4)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:35 +01:00
Cristian Iorga 164083d31f bitbake: Hob wizard-like reorganization
Hob is now more context-sensitive regarding
user changes/options. Also, the workflow have been
streamlined and resembles more of a wizard.
Beautified some hardcoded values.
Fixed typo.
New streamlined Image Configuration page.
Build and/or Edit image buttons presence
is context sensitive.
Recipes and packages tabs selected automatically
based on custom image or pre-defined target image
(included or all).
Context sensitive Back button.

Fixes [YOCTO 2165]

(Bitbake rev: b48cd7dcf57b1abc8c5b46ced11d4f57bf06e557)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Liming An 8a3ae43815 bitbake: Hob: change the Build failure scenario as ui design
As ui design 'build-fail-spec.pdf' to change the GUI

[YOCTO #2183]

(Bitbake rev: f9b81e44b2e71b4de6729bd2c69b25fd619b5fed)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Robert Yang cc3da1236c HOB: 'str' object has no attribute 'close'
For builddetailspage.py:
  The "f" was a stream in the past, it is a string now, so it doesn't
  need f.close(), and change its name to "branch".

  And we don't need the "2>&1" since bb.process.run() can handle it, it
  will raise exception when error occurs, we should handle the exception
  ourselves if we want to ignore the error.

For hig.py:
  Use bb.process.Popen() since it doesn't need the return value. If we
  use bb.process.run(), the parent process will wait for the child process
  to terminate to get the result.

[YOCTO #2511]

(Bitbake rev: ab10f3da1976581c371c43cdb88f405cf6fbcd95)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Robert Yang 094742bed2 replace os.popen with subprocess.Popen
Replace os.popen with subprocess.Popen since the older function would
fail (more or less) silently if the executed program cannot be found

There is a bb.process.run() which will invoke the Popen to run command,
use it for simplify the code.

For the:
p4file = os.popen("%s%s files %s" % (p4cmd, p4opt, depot))
...
for file in p4file:
    list = file.split()

in bitbake/lib/bb/fetch2/perforce.py, it should be an error in the past,
since it didn't use readline() to read the pipe, but directly used the
split() for the pipe. Use the bb.process.run would fix the problem since
bb.process.run will return strings.

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2075]

(Bitbake rev: 8d6700255a6d4dda403c89b171a6d4a1883e5aae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:11 +01:00
Liming An 374ad22550 Hob: change the build failure scenario as ui design
change the top bar display in build 'issue' page

[YOCTO #2183]

(Bitbake rev: 0705d3db1ce6d0f29301e2428c990ab0d9b2860e)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:17 +01:00
Joshua Lock 44a40f7a56 lib/bb/ui/crumbs/: replace custom HobNotebook
The custom HobNotebook widget was implemented to address perceived
deficiencies in the gtk.Notebook API.

Recent inspection reveals that the API is capable of all that Hob
requires of it and therefore maintaining a custom class to provide
similar functionality does not make sense.

Addresses [YOCTO #2276]

(Bitbake rev: e683caa9863bbb52480346669806f22173629a5e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:25 +01:00
Dongxiao Xu 139a91d742 Hob: Set the "stop" button insensitive before hide it
If user stops a build, we need to firstly set the button insensitive and
then hide it. This ensures the button's init status is "insensitive" in
next build.

(Bitbake rev: ea37272ccc28d6e24b48286e5c4c3edbad1d57cd)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Shane Wang 62c908c88b Hob: remember layers and settings between Hob sessions
This patch is to remember layers and settings between Hob sessions, which
includes:
 - Put some variables for the build details screen from Configuration to
   Parameters because they are not actually for build but for show
 - We create a dummy Configuration instance and a dummy Parameters instance
   in __init__ of builder
 - The two instances will be assigned the real values by
   update_configuration_parameters() after parsing (in the event callback)
 - When it is the first time to launch Hob in a build directory, nothing is
   remembered since everything is fresh.
 - The feature is implemented with templates, and based on the hook for Hob.
 - When the user changes the layers or the settings, a default template file
   is saved into ".hob/".
 - Later on, the layers and the settings are remembered by loading the default
   template automatically.

(Bitbake rev: f7c874ab930b9e7f95e79d0e84e62eb9b967f566)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:48:48 +01:00
Liming An 9067f7bfc2 Hob:Fixed some incorrect values of Build configuration tab
Because some variables not be updated when building started, so add them
to the updating function of configuration class, and add reset function of
configurate treeview of building detail page

[YOCTO #2244]

(Bitbake rev: 06ce753fd4680a204ccc63949ace637dc1c115e2)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:05:23 +01:00
Shane Wang d2402f6c8e Hob: reset issue indication and build status before build starts on build details screen
(Bitbake rev: 5fed953105fd58f09e42dce233aab2c6eced7c37)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-05 14:00:27 +01:00
Dongxiao Xu f414dbbaa0 Hob: Set stop button sensitive after task started
(Bitbake rev: e62a5cfbf21d22ab9f88dcd954132c1c52802360)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-05 14:00:26 +01:00
Liming An 525275dcfd Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build
Fixed the issue about the building log scrollbar can not auto scroll to page end sometimes

[YOCTO #2098]

(Bitbake rev: 035e146ff92236a3eda71ad71e8389737f91753b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-30 17:20:21 +01:00
Joshua Lock 57434b40b8 lib/bb/ui/crumbs: hob progress bar should not be red when user stops build
If the user explicitly stops the build telling them the build failed is a
misnomer.

(Bitbake rev: 722f4f0e31f9debf5ad20a91da759a8c25151567)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 21:12:57 +01:00
Shane Wang 2aa1468054 Hob: change some words for build configurations on build details screen
This patch is to change some words of variables to make them consistent with the GUI.

(Bitbake rev: 4af7ab24ff3b170dfa74159c057e7110a615a8d3)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 21:12:56 +01:00
Liming An 7990d36f50 Hob: fixed some not compatible places for make runningbuild.py can be reused by another application
The runningbuild.py has been shared by different applications, not only hob, so fixed the some not compatibled codes

(From Poky rev: 99fa7388500fa97fe4629456daa50bb5637e51e6)

(Bitbake rev: 23c13560fa76442c798058700863bd91491ca826)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-28 16:49:19 +01:00
Liming An 26cce34e4d Hob: change the implementation way about get config info for building log
Make the building log config information to get from the bitbake parameters directly, and then cancel the old way of filting the building log on running

[YOCTO #2144]

(From Poky rev: b52025a0fe2ca65e4d8549b1b90f5813b0c2e39f)

(Bitbake rev: 983f8848da0be02dadb1bb6530ff736325d014ba)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-28 16:49:18 +01:00
Joshua Lock 58c1981205 lib/bb/ui/crumbs: tweak build status display
Use two lines to display the active task and recipe, per visual design.

(From Poky rev: ea61503fc439e033b341bb7a50bac77c5e88834e)

(Bitbake rev: ab508907308e8b1bc1b097df1f583dffd7ef25af)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-28 16:49:17 +01:00
Shane Wang a80fc637de Hob: add build status labels in the build details screen to make it more close to the visual design
This patch is to add build status (incl. "Running task XX of XX: XXXXXX") in the build details screen,
in order to provide clear information about task in progress and make the GUI close to the visual design.

[Yocto #2098]

(Bitbake rev: 02d3451b2e0744204a1280f9effe9fd862bb4faf)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:34 +01:00
Joshua Lock d0bb6d292a lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button
The buttons taking the user back to image configuration should be prefixed
with '<<'.

(Bitbake rev: e0d598b454c01303a0ea9503feef3ce6f1ed1d69)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:33 +01:00
Liming An 98fa27c4c9 Hob: add auto scroll to rows which be new appended in hob building log page
For make the building screen to provide clear information about task in progress by request, so add this function.

At the beginning of building, the vertical scroll bar will go to the active area automatically.
Once the user moves the scroll bar in the middle, the automatic move of the bar is disabled.
However, once the user moves it to the bottom again, it will be kept to the bottom even though more logs come.

[Yocto #2098]

(Bitbake rev: cf43be6685d45c66e6508bbce653f8a67db66a9b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 16:10:24 +00:00
Liming An f427bfa0e4 Hob: reset the policy to forbid the horizontal scrolling for building log
This patch is not to show the horizontal scroll bar for building log, and add CellRendererText class to wrap the text.

[Yocto #2091]

(Bitbake rev: 7c5e1297c1af2edd46315e3dec4516f850d5e222)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 16:10:24 +00:00
Joshua Lock 21970f4755 lib/bb/ui/crumbs: Add HobAltButton and use it
This adds a gtk.Button subclass for secondary actions which unsets the
relief so that the user is aware that the button is clickable and yet it is
more subtle than the primary action (such that the primary action is the
most obvious one) - this is per the interaction design.

Further we replace all uses of gtk.LinkButton with the new HobAltButton

Partially addresses [YOCTO #2105], a follow on patch will theme the button
so that it matches the visual design.

(From Poky rev: c3f17fed243180678264168968333463b203bfa0)

(Bitbake rev: 601521c2d7f5568d94529a77b2cbe19fef7cbf48)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22 14:40:41 +00:00
Shane Wang dab638e150 Hob: show indicators on the tabs of the Hob notebook
This patch is to show the indicators (e.g., the number of the issues) in the build details page to highlight.

(From Poky rev: 2e08a8e6818b8f1df7eaac499ebc3a5854efe7be)

(Bitbake rev: f2eead1bc20c48b2f36e880a879a5a50e6e6567b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-20 15:21:33 +00:00
Shane Wang c4017bc518 Hob: use HobNotebook to implement a notebook in build details page
This patch is to use HobNotebook we defined to implement the notebook in the build details page.

(From Poky rev: 792c5eb29cf44d9ef559ae59802327fb1bb2cb3c)

(Bitbake rev: d51ad20aa00f2af6c7174910b31523fff0e5a639)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-20 15:21:33 +00:00
Dongxiao Xu 602adb0e58 Hob: Change Box's padding value
For Box type of widget, change the padding value to be HIG consistent,
that is an increments of 6 pixels.

(Bitbake rev: 0347e99ca5c232832f2b490584d76872c6d77311)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-15 10:35:18 +00:00
Dongxiao Xu 656f9a0758 Hob: A new implemetation (v2)
This commit implements a new design for hob
Some of the new features:
 - Friendly new designed GUI. Quick response to user actions.
 - Two step builds support package generation and image generation.
 - Support running GUI seprarately from bitbake server.
 - Recipe/package selection and deselection.
 - Accurate customization for image contents and size.
 - Progress bars showing the parsing and build status.
 - Load/save user configurations from/into templates.

(Bitbake rev: 4dacd29f9c957d20f4583330b51e5420f9c3338d)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Fengxia Hua <fengxia.hua@intel.com>
Designed-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 18:04:27 +00:00