aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2012-12-14data_smart/BBHandler: Fix SkipParse exception handlingRichard Purdie
If SkipParse is raised from something which isn't anonymous python, it wasn't being handled correctly. This improves the handling for example from within inline python. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14bin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbakeRichard Purdie
The method this older code was accessing doesn't exist. A library shouldn't be changing behaviour based on the environment anyway when sepcific function calls exist to correctly setup the logging. Fix the crash if BBDEBUG was used by moving the code to bin/bitbake. [YOCTO #3319] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14command: Fix getCmdLineAction bugsRichard Purdie
Executing "bitbake" doesn't get a sane message since the None return value wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as otherwise an invalid variable is accessed which then crashes the server due to the previous bug. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14command: Add missing import tracebackRichard Purdie
Without this, if an exception occurs the server will silently crash with no feedback to the user about why (since traceback isn't imported). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11BBhandler/data: Fix __inherit_cache duplicationRichard Purdie
The inherits cache contains duplicate entries, some with the full patch, some just starting classes/xxx. This is a waste of parse time and potentially error prone. This patch fixes various pieces of code so the absolute paths are always preferred and work correctly. The inherits_class function did not work with full paths so the patch fixes this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11BBHandler/ast: Simplify/fix EXPORT_FUNCTIONS usageRichard Purdie
The current usage of EXPORT_FUNCTIONS is rather problematic since a class list (classes) is passed into the ast statement and cached as it was when first parsed. This class list may be different in other cases but is locked once in the cache. Worse, the construction of classes can be broken by exceptions during parsing at the wrong moments since the state of the parser is not always reset correctly. This can lead to leakage of other classes into the classes list. The current EXPORT_FUNCTIONS implementation looks at the last two currently inherited classes and sets up an indirect function call view the second last class inherited, e.g.: do_configure calls gnomebase_do_configure gnomebase_do_configure calls autotools_do_configure This intermediary doesn't seem to serve a useful purpose. This patch therefore makes builds deterministic and fixes various cache problems and indirection by removing the intermediaries and simply performing directly mapping for the cases where its needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07Revert "BBHandler: Ensure parser state engine is correctly reset for new ↵Richard Purdie
parsing" This reverts commit 3dc5e896a97154914cee6c47900e3bb2a2627cdb.
2012-12-07BBHandler: Ensure parser state engine is correctly reset for new parsingRichard Purdie
The classes variable in particular could be in an odd state if parsing of a previous recipe had abruptly ended. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04xmlrpc: Unbreak the transport by adding a missing logfile nameRichard Purdie
I appreciate a fixed value is suboptimal but this is better than not working at all! Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04uievent: Fix an init raceRichard Purdie
There is a race where the registerEventHandler() server call may happen in a different thread to the main UI, causing the main UI to see httplib.CannotSendRequest exceptions. This moves the call into the main thread, removing the init race and fixing errors I was seeing with the xmlrpc backend. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03hob: modified how the existence of a variable is checkedCristiana Voicu
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03data_smart: Improve get_hash to account for overrides and key expansionRichard Purdie
An issue was uncovered where changing: IMAGE_INSTALL_append = "X" to IMAGE_INSTALL_append = "X Y" in local.conf would not get noticed by bitbake. The issue is that the configuration hash doesn't account for overrides or key expansion. This patch improves get_hash to account for these. This means the hash does account for changes like the above. [YOCTO #3503] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03build.py: Preserve sigdata files in the stamps directoryRichard Purdie
Leaving the sigdata files around can aid debugging and doesn't harm anything. This is the easiest way to allow this to happen. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28build/siggen.py: Avoid removing too many stamps when cleaningRichard Purdie
The "*" part of the mask is to ensure we clean both any stamp, and any setscene varient. It turns out we would also trample other tasks, e.g. do_package_write could trample do_package_write_rpm. do_package also tramples do_package_write_* but this is less of an issue since the other tasks depend on it. Rather than use the wildcard, we can just use a list instead. [YOCTO #3484] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28hob: when BBLAYERS_NON_REMOVABLE is not set hob shows an errorCristiana Voicu
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26fetch2/wget: Fix for mixed-up wget commandsCristian Iorga
wget commands for check and resume were mixed-up, leading to the following issues: 1. long running "NOTE: Preparing runqueue" reason: objects were downloaded, not spidered on the mirror 2. Failing network test in Build Appliance, because wget 1.14 (in use in BA) will fail if a file already exists. During the network connectivity test, index.php file was actually downloaded, not spidered (checked for existence on yoctoproject.org website), leading to wget failure. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26fetch2/local: Fix bug introduced by expression ambiguityRichard Purdie
The last changes introduced an error in some of the logic. Add brackets to clarify the meaning of the expression and fix certain build failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26hob: make some layers non removableCristiana Voicu
- there are some layers which cannot be removed; so ,I have used a new variable called BBLAYERS_NON_REMOVABLE located in bblayers.conf, which contains those layers which cannot be deleted - "meta-hob" layer is added to this variable in hob code, like it's added to BBLAYERS var [YOCTO #3176] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26Update version to 1.17.01.17.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25fetch2: Avoid using FILESDIR in unpackRichard Purdie
Currently there is code which uses FILESDIR in unpack to ensure parent directories are created, leading to differing behaviour depending on which search path is used to locate the directory. This change standardises the code and takes the data from the fetcher in question meaning we can standardise the code and deprecate FILESDIR. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25fetch2/local: Improve handling of wildcard matchesRichard Purdie
Currently wildcard matches end up working by FILESDIR being defined in the metadata to a default of "." in FILESPATH which is hacky at best. This patch adds the behaviour into the fetcher so its at least slightly more explicit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruptionRichard Purdie
Using curses initscr/endwin causes screen corruption if for example you suspend bitbake and resume it. This changes the code to use a less invasive approach to determining colour availability on the terminal. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25hob/builder: Don't rerun sanity checksConstantin Musca
Run the sanity check only once [YOCTO #3377] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25hob: showing when build fails because out of disk spaceCristiana Voicu
-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] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21server/process.py: Change timeout error handlingRichard Purdie
In normal usage, we never hit the timeout issue. If we do, it becomes obvious that the current error handling is not good enough. The request may have made it to the server and the answer will get queued. This means the next command may get the return value from the previous command with suitably puzzling results. Without rewriting large sections of code, its not possible to avoid this problem. It is better to increase the timeout to several seconds giving the server a chance to respond and if it does timeout, hard exit since recovery is not possible with the code base today. I'd be happy to see the structure of this code improved but this quick fix at least stops corrupted builds from happening which has to be a good thing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-19knotty: Colorize knotty interactive console outputSeth Bollinger
Add bold color output to log level name and standard color output to log msg when bitbake is run from an iteractive console. Color output is only enabled if the terminal supports color. Used Jason Wessel's recommendation for transparency on verbose, note and plain. Signed-off-by: Seth Bollinger <seth.boll@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-19hob: warnings during the build should be displayed in the Issues tabCristiana Voicu
Any issues encountered during the build (fatal or not) is displayed in the Issues tab, and the total number of issues is changed. [YOCTO #3376] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-19runqueue: Allow partial setscene task coverageRichard Purdie
When the setscene code was originally written it was thought that we'd allow "partial" coverage. For example, if we just want to build the target "bash:do_populate_sysroot" and its available from sstate, it makes no sense to install gcc-cross's sstate package as its simply not needed. Due to various other issues in the codebase, this functionality was disabled/removed to allow the setscene code and sstate to stabilise and allow us to concentrate on other problems. The time has now come to enable "partial" coverage. There are two major changes in this patch: a) Creation of an unskippable list. This lists direct dependencies of build targets and hence things that cannot be skipped. b) Addition of a handler which looks at a given setscene target and what depends on it and then decides whether its necessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-19parse/cache/cooker: Preserve order in the file inclusion listRichard Purdie
The data returned by get_file_depends() may me used in contexts like checksums where order is important. The current usage of sets means that some of the checksums can change in circumstances they should not. This patch changes to use lists, thereby removing the problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14knotty: kill duplicated import of 'time'Christopher Larson
The duplicated import could result in an UnboundLocalError. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13print clear message for "bitbake -e ASSUME_PROVIDED"Robert Yang
"bitbake -e ASSUME_PROVIDED" should fail, but the error message wasn't clear enough in the past: $ bitbake -e bzip2-native [snip] ERROR: Command execution failed: Traceback (most recent call last): File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 94, in runAsyncCommand commandmethod(self.cmds_async, self, options) File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 323, in showEnvironmentTarget command.cooker.showEnvironment(None, pkg) File "/buildarea/lyang1/poky/bitbake/lib/bb/cooker.py", line 325, in showEnvironment fnid = taskdata.build_targets[targetid][0] KeyError: 0 [snip] With this patch, the massage will be: [snip] ERROR: bzip2-native is in ASSUME_PROVIDED ERROR: Command execution failed: Exited with 1 Summary: There were 2 ERROR messages shown, returning a non-zero exit code. [YOCTO #3392] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13hob: hob was freezing because it doesn't receives well the log fileCristiana Voicu
-after pressing "build image" button, hob was freezing because it didn't receive well the log file [YOCTO #3398] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01command: add error to return of runCommandChristopher Larson
Currently, command.py can return an error message from runCommand, due to being unable to run the command, yet few of our UIs (just hob) can handle it today. This can result in seeing a TypeError with traceback in certain rare circumstances. To resolve this, we need a clean way to get errors back from runCommand, without having to isinstance() the return value. This implements such a thing by making runCommand also return an error (or None if no error occurred). As runCommand now has a method of returning errors, we can also alter the getCmdLineAction bits such that the returned value is just the action, not an additional message. If a sync command wants to return an error, it raises CommandError(message), and the message will be passed to the caller appropriately. Example Usage: result, error = server.runCommand(...) if error: log.error('Unable to run command: %s' % error) return 1 Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01hob: providing details about process state through porgress barCristiana Voicu
-small changes to the text of the progress bar when parsing recipes [YOCTO #3282] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30bitbake/server: Remove dead console log codeRichard Purdie
This code is dead and doesn't do anything so lets remove it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30cooker.py: Don't dump the environment into the console log fileRichard Purdie
Dumping the environment data into the console log files directory is invariably not what the user wants or expects and leads to confusion when looking at the log directory. This change forces the logs to be disabled by default when using the -e option. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30uihelper: Set update flag when start event encounteredRichard Purdie
Its a minor correctness detail but the update flag should be set when Start events are encountered. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30knotty: Ensure last tasks are disaplyed correctly in the footerRichard Purdie
There was an issue where the last tasks run by bitbake would not correctly get displayed in the knotty footer. This was due to the total count including active tasks. This change ensures the footer is displayed if the are any running tasks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27hob: reordering the layers in the Hob Layers dialogCristiana Voicu
-since the order of the layers can potentially impact the build outcome, users should be able to reorder the layers within the layers dialog; -used TreeView Drag and Drop [YOCTO #3270] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27hob/hig: Hob doesn't save properly proxy settingsCristian Iorga
User introduced proxy settings were not saved when a proxy details input dialog was opened. The proxy settings were lost upon return, and restored from the previously stored one. Also: Code cleanup: details_cb() function duplicate definition removed Fixes [YOCTO #3240] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27hob: during recipe parsing, progress bar text provides details about the ↵Cristiana Voicu
process state - indicating on progress bar that hob has gone from parsing recipes to "Generating dependency tree"; this will provide some visibility of what has caused the "stop" button state to change [YOCTO #3282] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27hob: add a progress indicator when you select 'view log'Cristiana Voicu
- 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] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-25bitbake: hob/builder: Hob crashes because of bad initCristian Iorga
Image selection is not properly initialized to none, and it used before having a chance to have a value. Due to dynamic nature of Python, variable is used before it exists, in this case. This causes a crash. Bug introduced during the fix of [YOCTO #3228] Fixes [YOCTO #3334] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24hob/settings: add a scroll bar for the box with mirrorsCristiana Voicu
- added a scroll bar in the shared state tab from settings - added a signal on it, so when you add a new mirror, it will auto-scroll to the end of the list [YOCTO #3229] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24bitbake: hob/builder: Image selection is remembered while changing adv settingsCristian Iorga
Image selection is remembered correctly even after advanced settings have been changed. Selected image was reset even when it was not the case. Fixes [YOCTO #3228] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24hob/builddetailspage: set "Log" page as defaultCristiana Voicu
- when you do a build you should see "Log" page, not "Build configuration" page [YOCTO #2569] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24hob/imageconfigurationpage: progress bar shows when recipe parsing is stoppedCristiana Voicu
-when the recipe parsing process is stopped, the progress bar shows "Stopping recipe parsing" [YOCTO #3259] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24bitbake: hob/hobwidget: "Brought in by" column is now displayed correctlyCristian Iorga
In "Edit Recipes" and "Edit packages" pages, the "Brought in by" column is displayed correctly, with the right number of additional packages and a proper title. Fixes [YOCTO #2195]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24hob: stop build without percentage shownAndrei Dinu
added a method in progressbar.py that doesn't update the percentage in the progress bar shown in hob. the call of the method is done in builder.py. Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24hob: change behavior for "cancel" button from the Recipe selection pageCristiana Voicu
-when returned to the Image configuration page, after canceling on the Recipe selection page, the image selected previously is now shown corectly [YOCTO #3205} Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>