From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 66E58E0095C; Tue, 14 Jul 2015 06:37:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9B933E00985 for ; Tue, 14 Jul 2015 06:37:54 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 14 Jul 2015 06:37:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,472,1432623600"; d="scan'208";a="762190998" Received: from linux.intel.com ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 14 Jul 2015 06:37:53 -0700 Received: from linux.intel.com (vmed.fi.intel.com [10.237.72.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTP id 4D17F6A4005; Tue, 14 Jul 2015 06:37:11 -0700 (PDT) Date: Tue, 14 Jul 2015 16:37:48 +0300 From: Ed Bartosh To: "Damian, Alexandru" Message-ID: <20150714133748.GB25220@linux.intel.com> References: <20150710144844.GA14439@linux.intel.com> <55A3EBB9.5060109@intel.com> MIME-Version: 1.0 In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "toaster@yoctoproject.org" Subject: Re: [review-request] ed/toaster/misc X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: ed.bartosh@linux.intel.com List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 13:37:59 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Alex, Thank you for review. My answers are below. On Tue, Jul 14, 2015 at 12:18:02PM +0100, Damian, Alexandru wrote: > Hi, > > I have some comments below: > > *toaster: get rid of _createdirpath function* > > os.mkdirs is missing the mode specification; I am not sure it matters, > though. I think it shouldn't matter, but it doesn't look very clear as I was lazy and put both changes in one commit. Thanks to point that out to me. I've added mode to the call and updated the branch. > > > *toaster: Wait for toaster gui to come* > > I am not sure which logger should to be used here; the reason for > changing the logger in the first place (which was originally defined as > "BitBake" was that the "BitBake" logger settings are modified in > bitbake/lib/bb/__init__.py, and it is targeted at the inner Bitbake core; > some updates there changed the original output, with output disappearing > from the console being an obvious effect. > Messing with "BitBake" logger settings with this may have side effects > throught the bitbake code, so I refrained from touching that > > I considered using the "toaster" logger that is defined in > bitbake/lib/toaster/toastermain/settings.py and outputs strictly to > console; I felt likewise reluctant to use this logger because changing it > to output to a file would be affect the way the django application is > logging. > > ToasterLogger is not defined anywhere, and this is why I used it here. And this apparently didn't work out well and caused "ToasterUI waiting for events" message to disappear from toaster_ui.log and be controller failing after 10 unsuccessful attempts to find this message in the log. > I am not sure I understand the root cause of why the code breaks when using > "ToasterLogger" instead of "BitBake"; can you please assess the root cause > and get a solution to have messages properly logged to the toaster_ui.log > file using a logger that's not BitBake ? OK, I'll look at it. Meanwhile I'd suggest to accept this change because it's much better than previous one. It doesn't fix the root case, but it reverts the change that caused the bug. Regards, Ed > On Mon, Jul 13, 2015 at 5:47 PM, Michael Wood > wrote: > > > On 10/07/15 15:48, Ed Bartosh wrote: > > > >> Hi reviewers, > >> > >> Please review fix for YOCTO: #7965: Wait for toaster gui to come > >> and couple of other changes: > >> 1. tiny refactoring change: get rid of _createdirpath function > >> 2. and small fix: Fix usage of wrong variables > >> > >> -- > >> Regards, > >> Ed > >> > > > > * 7cee08d toaster: get rid of _createdirpath function > > * eae47f7 toaster: Fix usage of wrong variables > > * 321d6ae toaster: Wait for toaster gui to come > > > > Looks fine to me, though not familiar enough with build stuff to fully OK > > this branch. > > > > While you're in localhostbecontroller > > > > We could also get rid of > > > > def _shellcmd(self, command, cwd = None): > > if cwd is None: > > cwd = self.be.sourcedir > > > > #logger.debug("lbc_shellcmmd: (%s) %s" % (cwd, command)) > > p = subprocess.Popen(command, cwd = cwd, shell=True, > > stdout=subprocess.PIPE, stderr=subprocess.PIPE) > > (out,err) = p.communicate() > > p.wait() > > if p.returncode: > > if len(err) == 0: > > err = "command: %s \n%s" % (command, out) > > else: > > err = "command: %s \n%s" % (command, err) > > #logger.warn("localhostbecontroller: shellcmd error %s" % err) > > raise ShellCmdException(err) > > else: > > #logger.debug("localhostbecontroller: shellcmd success") > > return out > > > > > > I believe with: > > > > subprocess.check_output > > > > Thanks, > > > > Michael > > > > -- > > _______________________________________________ > > toaster mailing list > > toaster@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/toaster > > > > > > -- > Alex Damian > Yocto Project > SSG / OTC > -- > _______________________________________________ > toaster mailing list > toaster@yoctoproject.org > https://lists.yoctoproject.org/listinfo/toaster -- -- Regards, Ed