Bug 4895

Summary: Enhance LSB_Test.sh to detect the download error
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yi Zhao <yi.zhao>
Component: coreAssignee: Yi Zhao <yi.zhao>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: corneliux.stoicescu, hongxu.jia, ke.zou, liezhi.yang, meta.mr.watcher, meta.watcher, ning.zhang, Qi.Chen, sgw, yi.zhao
Version: 1.5   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yi Zhao 2013-07-23 04:36:23 UTC
Git rev: master/31e6eee860b5f9f4ac9ef0889bcff5648de6e3f9

When run LSB_Test.sh to perform LSB test, during packages downloading, if the package does not exist in the remote server, the script can not detect the failure. That is because the default behavior of curl command. 

In normal cases when a HTTP server fails to deliver a file, it returns an HTML document to describe the fail reason (e.g. 404 Not Found). The curl will output this page as a file and not return error. 

Add a "-f" option will prevent curl from outputting that and return error 22.