summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
Commit message (Collapse)AuthorAgeFilesLines
* Hob: A new implemetation (v2)Dongxiao Xu2012-02-241-620/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* ui/crumbs/tasklistmodel: don't add empty entries to COL_BINBJoshua Lock2011-08-301-1/+1
| | | | | | | (Bitbake rev: 85c5b8b3b9c805883537900a46eddb2301ee93f9) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: loop optimisation in include_item()Joshua Lock2011-08-301-13/+7
| | | | | | | | | | | | Rather than trying to iterate the model to find whether the item is already included and then iterate the model again to find the items path attempt to find the path first and if the path is found test whether the COL_INC of the row is set. (Bitbake rev: 82845569c37591f6b097b9db071484f8171a39ea) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: remove unnecessary checkJoshua Lock2011-08-301-3/+2
| | | | | | | | | Cheaper to set COL_INC to True regardless of whether it's already set. (Bitbake rev: 12c6f98ba7a68baeeaee00594d910e1be8d55d87) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: optimise find_path_for_item()Joshua Lock2011-08-301-4/+2
| | | | | | | | | | | | | Rather than calling get_path() for each iterated value use the get_value() method to lookup the COL_NAME value and only call get_path() for a match. This should save some time by potentially removing N-1 calls to get_path() from the loop. (Bitbake rev: d2450536269996147a22d6eafbdf72aa62afa4f6) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: prevent packages depending on each otherJoshua Lock2011-08-301-20/+22
| | | | | | | | | | | | | | | Don't add y to x's COL_BINB if x is in y's COL_BINB - prevent circular dependencies. Further this patch improves the variable naming to make this code easier to follow. Fixes [YOCTO #1423] (Bitbake rev: 01ef2ab0d201f3cb3666462558c9cf485592e04f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: don't add same item to binb column more than onceJoshua Lock2011-08-301-2/+3
| | | | | | | | | | | | In the same vein as a similar, earlier, patch where I missed the second loop which modifies the binb column. Fixes [YOCTO #1420] (Bitbake rev: 6ad1103b5fd592afa9ea03ef5a0d706604cc0e0f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: don't add same item to binb column more than onceJoshua Lock2011-08-291-2/+3
| | | | | | | (Bitbake rev: 5e95098be1c1f92c2d72fb371c94bab31c46cf83) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: fix find_reverse_depends methodJoshua Lock2011-08-241-1/+1
| | | | | | | | | | This fixes an embarassing typo which meant the method actually returned a list of packages which didn't depend on the passed pn. (Bitbake rev: a17334e85869bf78d63df1b2336d68980a0b359f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: track the PN for each entry in the modelJoshua Lock2011-08-231-2/+18
| | | | | | | | | | | | Now that we've switched to packages in the model, rather than PN, it makes sense to add an extra field to store the PN of the package. This patch includes a convenience method to retrieve a list of selected PN's. (Bitbake rev: cf79424592a81378de5edad11cf6c4f427c94bcc) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: store all binb, not just the firstJoshua Lock2011-08-231-33/+17
| | | | | | | | | | | | | | This makes it easier for the user to determine what the effects of a removal may be, further it means we no longer need the find_alt_dependency method which could be a fairly time-consuming method depending on the size of the contents table. Partially addresses [YOCTO #1365] (Bitbake rev: 91d1f5f5a44c80e6702221509e2e9aadbe05bcc0) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: remove useless items from dependency listJoshua Lock2011-08-231-2/+10
| | | | | | | | | | Ensure the dependency list is uniquified, doesn't include self references and further doesn't include -dev references. (Bitbake rev: 70aebebc3867d52e460355667e711c7c6dcd50ce) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: more robust checking for substringsJoshua Lock2011-08-231-9/+17
| | | | | | | | | | | | | | | Relying on the count() method of Str to determine whether the string contains a substring is error prone purely because the return value doesn't strictly convert to a Boolean value. To that end take the more pythonic approach of using the in operator (foo in bar) to check for the substring. Further, add a helper method for the common case of testing whether a pn is -native, -cross or virtual/ (Bitbake rev: d7768cefcddd59a5102d7e9b67e4416bf8603f55) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: simplify conditional in include_itemJoshua Lock2011-08-151-5/+2
| | | | | | | | | | No need to check if the name ends with -native or -cross as path will be None in this instance. (Bitbake rev: bca739cdf55ba2a1c5e372e512d4f088345f245f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: make package_model_filter a little saferJoshua Lock2011-08-151-1/+1
| | | | | | | | | Ignore names that include '-cross', rather than just 'cross' (Bitbake rev: 06abfc9caf7f237a6bb762fb3ae9f3dec99688ca) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: optimise find_path_for_itemJoshua Lock2011-08-151-0/+5
| | | | | | | | | | | If the item_name contains virtual/, -native or -cross it won't be present in the model. Return None early in this circumstance rather than iterating the entire model and still returning None. (Bitbake rev: aeef5a4b3999bd924e89e7738efe24f80ae94fd0) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: include package level informationJoshua Lock2011-08-151-21/+19
| | | | | | | | | | | | | Until now the hob UI has only contained recipe (pn) level targets in the data store, this patch switches to including package level information. This is slightly slower in all model related cases (more entries) but gives much more flexibility for image customisation. (Bitbake rev: 049927e99c8d1db7273fbd179b2614bd2ea9403b) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/crumbs/tasklistmodel: filter nativesdk packages out of viewsJoshua Lock2011-08-151-1/+1
| | | | | | | (Bitbake rev: 0c62bbc5fb149c8baccffebd5f17e25d3e7dbf69) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: don't include an item in its own dependsJoshua Lock2011-08-111-0/+3
| | | | | | | | | This causes the simple removal algorithm to perform needless circular logic (Bitbake rev: 396bbc220604c19ced4add30dd17f7f22d5e0022) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: correctly uniquify dependency listJoshua Lock2011-08-111-1/+2
| | | | | | | | | | | Fix thinko - the squish method returns a uniquified list, it doesn't modify the list in place. Therefore the call to squish() was useless as its return value was never assigned. (Bitbake rev: 93bae8f223cdeb7b7e31c309b5d785b97ae1c2ac) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: fix some typos and add comments to mark()Joshua Lock2011-08-111-7/+15
| | | | | | | | | | | | | | | | Two similarly named variables in the mark() method resulted in the wrong variable being used in a couple of places. This patch adresses this in several ways: 1) Renames the variables to be less similar 2) Uses the correct variables 3) Adds some coments to document the methods intent Partially addresses [YOCTO #1355] (Bitbake rev: ba9f2fe496eec0a221b563ffc9bb76eca592192f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: prevent hang when removing itemJoshua Lock2011-08-091-1/+3
| | | | | | | | | | | | | | It's possible to trigger an infinite recursion when removing a package where many of the dependencies share their dependencies. Prevent this by keeping a list of removed item names and only removing the item when it's not in the list. Addresses [YOCTO #1319] (Bitbake rev: 0ed58f28e869cceeefa930a3f1f46c5f3e9ffe21) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/ui/crumbs/tasklistmodel: fix regex used for loading image recipesJoshua Lock2011-08-041-1/+1
| | | | | | | | | Fixes [YOCTO #1321] (Bitbake rev: a0fb6583222f2d981a69f0dae81b40db6caaa0d5) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* hob: fix loading customised image recipeJoshua Lock2011-07-271-1/+1
| | | | | | | | | | | | | | The signal handler of the 'Base image' combo was still connected during load such that updating the UI to reflect the loaded base image triggered a change of the model. Fix this by disconnecting the signal handler when updating the displayed 'Base image'. Fixes [YOCTO #1282] (Bitbake rev: 58036a79cb79d1dff307e2cfed0e684493178507) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: work around overly aggressive package removalJoshua Lock2011-07-271-3/+22
| | | | | | | | | | | | | | | | | | | | | The mark() method, which removes dependent and rdependent items, is overly aggressive removing items which are actually required by user selected items and then causing a removal of those items. Because the data structures used are not fine grained enough to do more intelligent dependency tracking the simplest "fix" is to track removals which are marked as "User Selected" and re-add those (and therefore their dependencies) once the aggressive removal is completed. Because the aggressive removal already ignores images and tasks this should make the removal behave as expected though certainly leaves area for improvement in future. Fixes [YOCTO #1280]. (Bitbake rev: 1e1055262450de994202fc3e5943b8b19f628681) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: fix loading a saved recipeJessica Zhang2011-07-261-1/+1
| | | | | | | | | | | | | use the correct variable userpkgs instead of packages during reload saved bb file that contains user customization. Fixes [YOCTO #1289] (Bitbake rev: 2650be190afc05f9472aca8b11af99205a342838) Signed-off-by: Jessica Zhang <jessica.zhang@intel.com> Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: don't iterate whole model in find_alt_dependency()Joshua Lock2011-07-261-10/+9
| | | | | | | | | | | The method needs to find an included item anyway so rather than iterating the entire model and checking the included status of each entry iterate over the contents gtk.TreeFilter. (Bitbake rev: 79bdd501075ff5164a8ee673a6a2a0e402978ae5) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: handle items added in by base image being removedJoshua Lock2011-07-261-1/+15
| | | | | | | | | | | | | | When building an image based on an existing image we need to correctly handle removals from that images package set. Do so by testing if any of the items brought in by the base image are removed and, if so, building an image from scratch with all of the selected packages included. Fixes [YOCTO #1232] (Bitbake rev: 812ead4900714545850698d8ce29194f4ee8db0e) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/hob: enable building an image with minimal contentsJoshua Lock2011-07-261-2/+12
| | | | | | | | | | | | This patch enables a user to build a rootfs containing only the selected packages without having to have first selected a 'Base image'. Fixes [YOCTO #1239] (Bitbake rev: 05c82da31a69c910e72b58b07afcd9fca8c55479) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: don't show native and cross recipesJoshua Lock2011-07-251-0/+3
| | | | | | | | | Addresses [YOCTO #1224] (Bitbake rev: 80f8d796392cbf3c54149c06347c35f871fc2d79) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: ignore tasks and images when marking dependenciesJoshua Lock2011-07-211-4/+17
| | | | | | | | | | | | | | | When calculating what dependencies are affected by the removal of an item we should ignore images and tasks as they are not constructs which make sense in the GUI. E.g: if we don't ignore tasks and remove opkg from an image based on core-image-minimal the fact that opkg was brought in by task-core results in task-core and all of the packages it brought in being removed and, eventually, an empty image. (Bitbake rev: 205b52bfc7f28af0c50fef1f741fae6af16fb0dc) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: fix saving recipesJoshua Lock2011-07-211-2/+1
| | | | | | | | | | | | | After switching to dynamically finding the relative path for the recipe file it's no longer to append .bb when inserting the require line into the saved recipe. Fixes [YOCTO #1247] (Bitbake rev: 2d05ce4f527daa905ed64485029ebeb2b349daa6) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: fix automatic removal of orphaned itemsJoshua Lock2011-07-131-15/+19
| | | | | | | | | | | | | | | | | The sweep_up() method intends to remove all packages with an empty brought in by column, this patch changes the implementation to be more reliable. Each time a removal is triggered we begin interating the contents model again at the beginning, only once the contents model has been iterated from start to finish without any removals can we be certain that there will be no more orphaned items. Fixes [YOCTO #1218] (Bitbake rev: 4803c6d3d1db31105d98a7f71596875333db0dc5) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: update brought in by column when possibleJoshua Lock2011-07-131-4/+10
| | | | | | | | | | | | | | When a package is orphaned we were not correctly updating the brought-in-by column if a later package additon would have brought that package in as a dependency. This patch ensures that orphan packages are correctly re-parented when appropriate. Partially addresses [YOCTO #1218] (Bitbake rev: 570405f2f5a3976b308ef825ef477fb5cb6ee804) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/crumbs/tasklistmodel: fix reset methodJoshua Lock2011-07-081-4/+16
| | | | | | | | | | | | | The reset() method only touched the contents sub-model, which does not include the selected image(s). This patch ensures that reset correctly unsets any image selection when called. Further we re-initialise the COL_IMG column when resetting packages. (Bitbake rev: f3fbc97471961042e5eb8224dc07dcc04293efcf) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* hob: re-designed interaction and implementationJoshua Lock2011-07-051-78/+248
| | | | | | | | | | | | | | | | | | | | | Highlights include: * Atempted GNOME HIG compliance * Simplified UI and interaction model * Sorting and type to find in tree views * Preferences dialog to modify local settings * Dialog to add and remove layers * Search in packages list * Save/Load image recipes The build model has been changed, hob will attempt to build all dependent packages of an image and then use the buildFile server method to build the created image. (Bitbake rev: 48e64acaae4a741b9f5630f426fb4e6142755c2c) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: introduce crumbs.TaskListModel a gtk.ListStore subclassJoshua Lock2011-02-241-0/+346
Provide a gtk.ListStore subclass which includes a function, populate(), which takes as input the data emitted by bb.event.TargetsTreeGenerated and fills the ListStore model appropriately. Furthermore convenience functions are provided by which the caller can get gtk.TreeModel subclasses which provide filtered views of the data. Signed-off-by: Joshua Lock <josh@linux.intel.com>