SDK: trap any IO errors in the relocate script
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 25 Sep 2012 16:35:46 +0000 (19:35 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Sep 2012 14:02:28 +0000 (15:02 +0100)
commita66ec7bf4d1ba82ea595e438d91e6be50937f0ff
treef473fe0d3262bd86f729c7026a0a83df55ab99f4
parent4fbf2b33037a57c447bbdccae708c127cfda83b9
SDK: trap any IO errors in the relocate script

If the files being relocated are already used by other processes the
relocate script will fail with a traceback. This patch will trap any IO
errors when opening such a file and gracefully report them to the user.

Also change the exit code from 1 to -1 for a better adt-installer user
experience (like pointing the user to the adt_installer.log).

[YOCTO #3164]

(From OE-Core rev: 26daec758b2eaeb208356d5aa8a9a191bd366751)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/relocate_sdk.py