watson-intu / self-sdk

Other
44 stars 18 forks source link

Linux build falsely succeeds when error in downloading toolchain #11

Open elaske opened 7 years ago

elaske commented 7 years ago

First run:

$ ./scripts/build_linux.sh 
[ERROR]: Exception No such toolchain: linux-self
Known toolchains are:
Downloading toolchain naoqi-sdk-2.1.4.13-linux64.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4799  100  4799    0     0   3284      0  0:00:01  0:00:01 --:--:--  3291
Archive:  naoqi-sdk-2.1.4.13-linux64.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of naoqi-sdk-2.1.4.13-linux64.zip or
        naoqi-sdk-2.1.4.13-linux64.zip.zip, and cannot find naoqi-sdk-2.1.4.13-linux64.zip.ZIP, period.
[ERROR]: Could not parse <workspace>/self-sdk/scripts/../packages/naoqi-sdk-2.1.4.13-linux64/toolchain.xml
[ERROR]: Exception Feed location is not an existing path nor an url
Failed to install toolchain

It errors, which is fine. However, the toolchain installation was attempted, evident in subsequent build:

$ ./scripts/build_linux.sh 
Toolchain linux-self
No feed
No packages

Current build worktree: <workspace>/self-sdk
[ERROR]: Exception No such build config: linux-self

The toolchain was not successfully installed because the zip file was corrupted.

tc_install.sh should check that the unzip was successful before it attempts the installation.

LabPM commented 7 years ago

Related to https://github.com/watson-intu/self-sdk/issues/12