> -----Original Message-----
> From: Anders Darander [mailto:[email protected]]
> Sent: Tuesday, May 27, 2014 9:46 AM
> To: Stoicescu, CorneliuX
> Cc: [email protected]
> Subject: Re: [OE-core] [PATCH] oeqa/controllers/beaglebonetarget.py: add
> conditions for files copied to /boot
> 
> * Corneliu Stoicescu <[email protected]> [140526 15:23]:
> 
> > Sometimes the rootfs archive contains the kernel file
> > (core-image-full-cmdline) or the dtbs files (core-image-sato). Adding
> > verification to add them if they don't allready exist.
> 
> > Without this, the first condition would fail and the image deploy task would
> stop.
> 
> What failure and errors are you seeing?
> 

'[ ! -e /mnt/testrootfs/boot/uImage ] && cp 
~/test-kernel/mnt/testrootfs/boot/uImage' returns exit code 1 if the first 
condition is not met, and thus the deploy task fails. My version would return 
exit code 0 weather or not the first condition is met. 

We could also modify the way the commands are run to ignore that exit code but 
that would involve more changes, many of them not needed or expected by other 
commands and/or target controllers.

> > -                '[ ! -e /mnt/testrootfs/boot/uImage ] && cp ~/test-kernel
> /mnt/testrootfs/boot/uImage',
> > +                'if [ ! -e /mnt/testrootfs/boot/uImage ]; then cp
> > + ~/test-kernel /mnt/testrootfs/boot/uImage; fi',
> 
> It might be that I've had no coffee yet, but I can't see what difference your
> change is making (apart from being more verbose)?
> 
> The original code checks for the existance of /mnt/testrootfs/boot/uImage,
> negates the result and copies the test-kernel if the negated result is true, 
> i.e.
> if /mnt/testrootfs/boot/uImage doesn't exist, copy the test-kernel.
> 
> > -            self.deploy_cmds.append('[ ! -e /mnt/testrootfs/boot/{0} ] && 
> > cp
> ~/{0} /mnt/testrootfs/boot/'.format(dtbfn))
> > +            self.deploy_cmds.append('if [ ! -e
> > + /mnt/testrootfs/boot/{0} ]; then cp ~/{0}
> > + /mnt/testrootfs/boot/'.format(dtbfn) + '; fi')
> 
> See above...
> 
> Cheers,
> Anders
> 
> --
> Anders Darander
> ChargeStorm AB / eStorm AB
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to