| Summary: | SRC_URI with http or ftp path having "/download" at end fails to retrieve source | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Meta-yocto | Reporter: | Levant Tinaz <levant.tinaz> |
| Component: | meta-yocto | Assignee: | Joshua Lock - Disabled <josh> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Medium | CC: | levant.tinaz, poky.bs.watcher, poky.watcher, sgw |
| Version: | 0.9 | ||
| Target Milestone: | 0.9 M4 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Levant Tinaz
2010-02-12 19:47:52 UTC
Hardcoding behaviour like that is not acceptable, its not generic. Have you tried a url like: http://sourceforge.net/projects/cunit/files/CUnit/2.1-0/CUnit-${PV}-src.tar.gz/download;localpath=${DL_DIR}/CUnit-${PV}-src.tar.gz ? Yes, I've tried "download=" as you suggest. That downloads to the correct location with the correct file name but then I get this error: NOTE: package cunit-2.1-0: started NOTE: package cunit-2.1-0-r0: task do_fetch: started NOTE: fetch http://sourceforge.net/projects/cunit/files/CUnit/2.1-0/CUnit-2.1-0-src.tar.gz/download NOTE: localpath=/home/levant/src/PreOlive/Poky/sources/cunit-2.1-0-src.tar.gz NOTE: Task failed: Unknown fetch Error: 'FetchData' object has no attribute 'basename' NOTE: package cunit-2.1-0-r0: task do_fetch: failed ERROR: TaskFailed event exception, aborting NOTE: package cunit-2.1-0: failed which is due to ud.localpath being set explicitly in the SRC_URI so the localpath method is not called to set ud.localpath which is where basename is set to the download file name. Any SRC_URI that has "localpath=" option will generate this error due to that reason. I can fix that by adding the following: def fetch_uri(uri, ud, d): . . if ud.localpath == "": fetchcmd = fetchcmd.replace("${FILE}", ud.basename) Then my download works just fine but now the bug to be fixed is as noted above so this bug report Summary should be changed to "SRC_URI with localpath= doesn't work". Levant Tinaz I have fixed this issue in commit b78d5368ccd333587ec475be3f3fe058ec9045f2: fetch: fix setting of localpath in SRC_URI parameters When setting localpath in the SRC_URI parameters the basename should be set explicitly as the localpath() method is not called. |