**** BEGIN LOGGING AT Tue Aug 28 03:00:03 2018 Aug 28 08:06:30 good morning **** BEGIN LOGGING AT Tue Aug 28 09:19:08 2018 Aug 28 11:53:12 Not sure if this necessarily is the correct channel, but: Writing a recipe for webrtc, I need to write my own do_fetch. One of the steps in fetching, using Google's tools, uses the xz binary to unzip something after downloading. Even though I depend on xz-native, the xz binary is only available some time after do_fetch. Aug 28 11:53:32 Should I do the part which requires xz in do_unpack even though it downloads stuff, or is there a way to make xz available to do_fetch? Aug 28 11:54:13 I would've asked this in a #bitbake IRC channel or something if that existed, but none of the IRC channels I've seen seem entirely relevant to issues related to building bitbake recipes Aug 28 12:15:43 this is a fine place to ask such questions Aug 28 12:17:09 You may need to fiddle with the depedns so it is complete for fetch, might be setup for antother task Aug 28 12:17:53 I'm not exactly sure how to debug this though Aug 28 12:18:36 I got some help in #yocto, apparently DEPENDS is a shortcut for do_compile[depends], it works when I use do_fetch[depends] Aug 28 12:18:58 yeah, that is what I thought might happen Aug 28 12:26:16 Crofton: do you by any chance know how I can make bitbake not re-run fetch? How does a fetcher tell bitbake that the file is already downloaded? Aug 28 12:31:06 the fetcher is not my area of expertise :) Aug 28 16:59:36 mort: usually you dont want to fight bitbake fetcher, I guess you are talking about depot_tools, I think its better for you to write a fetcher for it or may be something like this https://patchwork.openembedded.org/patch/90775/ Aug 28 16:59:41 will help you Aug 28 17:01:21 yeah, that's best done as a new fetcher Aug 28 18:28:36 I found an issue with bitbake (have a fix), but I'm also trying to write a test case.. unfortunately the test case needs to look for bitbake output from a function (logger) to look for a problem.. Aug 28 18:28:58 but I can't get the test harness to get the UI output.. and I'm not sure what is wrong.. (I was trying to follow some examples in the bitbake event tests..) Aug 28 18:29:07 anyone here have any clues that might be able to help? Aug 28 18:29:12 http://git.openembedded.org/bitbake-contrib/commit/?h=mgh/cooker-fix&id=689fb757ede9bdabb704b04977ffc4f32f82ab0e Aug 28 18:29:26 (that is my work in progress.. fix for the issue is disabled, as I'm trying to make sure the test fails before I put in the fix) Aug 28 18:39:04 fray: there's a class in the oe-core qa tests to capture logger messages Aug 28 18:39:10 probably want something like that Aug 28 18:39:52 though actually i have a version that's a little nicer that i never got around to submitting, https://gist.github.com/kergoth/25ea6bed197b0355e4cf Aug 28 18:39:59 * kergoth yawns Aug 28 18:40:34 kergoth, problem is this is all in bitbake Aug 28 18:40:36 no OE Aug 28 18:41:03 it's a pretty common thing to have to do, i see no reason you couldn't copy it into bitbake's unittest suite Aug 28 18:41:12 I have a feeling the real problem is that logger is disconnected between the cooker module and the test run, and it's the same damned proper again and again.. Aug 28 18:41:24 python for whatever reason in this stuff wants to use different loggers in differnet modules Aug 28 18:41:43 that's how logging is designed to be used Aug 28 18:41:47 it rolls up Aug 28 18:41:57 Thats how it's supposed to work, but it never seems to work Aug 28 18:42:14 I've had exactly the same problem with bitbake-layers/tinfoil and others.. logging just disappears from cooker and other pieces.. Aug 28 18:42:29 hmm, can't say i've ever run into that working on stuff using tinfoil before Aug 28 18:42:55 likely just the configuration of the log handler isn't matching your expectations, in which case you can just configure it differently for your purposes Aug 28 18:43:28 at this point I don't know why the logger is disconnected fromc ooker Aug 28 18:43:43 since they both seem to write to the stdout, but the print_ui_queue can't see them Aug 28 18:44:24 remember that cooker runs in the server, not the ui. the messeages have to make it from the server to the UI to be printed unless the server shuts down after the UI has become unavailable, in which case we manually flush them to stdout Aug 28 18:44:42 this is bitbake-selftest.. so there is no ui/etc.. and that is part of the problem Aug 28 18:44:57 I followed the instructions fromt he event.py to setup a ui, but it doesn't work Aug 28 18:45:23 and like I said, I'm sure the disconnect is that cooker is using a different logger then the test side.. but I don't have a clue how to conenct them Aug 28 18:45:29 (other then the example I tried) Aug 28 18:45:51 like i said, the cooker runs in the server Aug 28 18:45:55 what bugs me the most about this is 'logging.getLogger("Bitbake")' doesn't seem to return the same thing in different contexts Aug 28 18:46:03 I'm running a function of the cooker, not the actual cooker Aug 28 18:46:04 nowadays tinfoil connects to the server to do the job, and receives logging messages from it Aug 28 18:46:15 and there is no tinfoil in the test cases Aug 28 18:46:54 it sounds like you're doing getLogger() in both the server and client, they'll be differetn, as they're different processes Aug 28 18:46:56 * kergoth shrugs Aug 28 18:46:58 whole test is essentially: Aug 28 18:47:00 collection = bb.cooker.CookerCollectFiles(bbfile_config_priorities) Aug 28 18:47:05 collection.collection_priorities(pkgfns, self.d) Aug 28 18:47:10 and check the logger for a warning message Aug 28 18:47:26 seems straightforward, capture the log messages in bb.cooker.logger Aug 28 18:47:27 but I can't get the loggers to work, and I don't understand why Aug 28 18:47:30 using the aforementioned class Aug 28 18:47:32 or manual Aug 28 18:48:43 if you intercept the messages in the logger, rather than the handler, the handler and formatting and printing shoudln't be a factor Aug 28 18:49:18 to intercept then in the logger, I'd have to write my own logger though wouldn't I? Aug 28 18:49:25 and then do something like bb.config.logger = myLogger Aug 28 18:49:27 no Aug 28 18:49:29 and hope it works? Aug 28 18:49:46 https://gist.github.com/kergoth/25ea6bed197b0355e4cf#file-logrecorder-py-L35 Aug 28 18:50:22 you just attach a custom handler to the logger that stores the messages rather than displaying them Aug 28 18:50:42 python logging allows multiple handlers and multiple filters on any logger Aug 28 18:51:15 when I get back to it I'll try.. but this is the biggest nitpick I have about the python stuff.. this logger stuff seems like it's global, but never is Aug 28 18:52:28 yeah, i'm not a big fan of the whole addressing a global index of loggers by name thing Aug 28 18:52:42 i''d rather just use objects and address them directly Aug 28 18:53:29 what kills me is it never seems to work right.. (global names) Aug 28 18:54:39 it doesn't help that you have to always be aware of what process you're running in, and the fact that we fork but don't exec doesn't make it less complicated Aug 28 19:21:03 kergoth is thre some magic to the handler? I tries something extremely simple: Aug 28 19:21:03 class LogHandler(logging.Handler): Aug 28 19:21:03 def __init__(self): Aug 28 19:21:03 self.logdata = [] Aug 28 19:21:03 def emit(self, record): Aug 28 19:21:03 self.logdata.append(record) Aug 28 19:21:16 and it complains level is not defined.. if I define that then it's filter is not defined Aug 28 19:23:51 nm.. figured it out.. Aug 28 19:23:56 need to call the __init__ on the logging.Handler Aug 28 19:25:42 ah, good catch Aug 28 19:33:03 http://git.openembedded.org/bitbake-contrib/commit/?h=mgh/cooker-fix&id=aedeabafd6ff401d8d285d4cc81232492915f76d Aug 28 19:33:07 that has the updated stuff in it **** ENDING LOGGING AT Wed Aug 29 03:00:03 2018