[Toaster] [review-request] ed/toaster/misc
Damian, Alexandru
alexandru.damian at intel.com
Tue Jul 14 04:18:02 PDT 2015
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.
*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. 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 ?
Otherwise, all fine.
Thank you,
Alex
On Mon, Jul 13, 2015 at 5:47 PM, Michael Wood <michael.g.wood at intel.com>
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 at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
--
Alex Damian
Yocto Project
SSG / OTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150714/8f446825/attachment.html>
More information about the toaster
mailing list