Bug 7796

Summary: SState: wget improvements
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Benjamin Esquivel <benjamin.esquivel>
Component: coreAssignee: Aníbal Limón <anibal.limon>
Status: VERIFIED FIXED QA Contact: Daniel Istrate <daniel.alexandrux.istrate>
Severity: enhancement    
Priority: Medium+ CC: alexandru.c.georgescu, benjamin.esquivel, bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher, richard.purdie
Version: unspecified   
Target Milestone: 1.9 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Comment 1 Richard Purdie 2015-06-04 14:25:34 UTC
There are two stages for this. One is parallelising the "present in sstate" checks. The patches for this have been separated out, cleaned up and merged.

There are also improvements to the wget fetcher, particularly so it can reuse conections rather than making a connection attempt per url. There is improved code for this in the branch which now uses TLS to hold the connection cache. 

To work correctly, the code had to be switched from wget to urllib2. We have to hack the class to make it reuse connections though (and also to support HEAD requests). We need to use the class to ensure proxy information is handled correctly.

My rpurdie/t222 branch has the improved code but more cleanup needs to be done, along with better tests before it can be submitted.
Comment 4 Daniel Istrate 2015-10-26 15:48:01 UTC
Verified on master: 505a82673ac2487df5ea343a6422c2fc47018831

The tests from bitbake/lib/bb/tests/fetch.py --> FetchCheckStatusTest validate this feature.

[daniel@fedora-ws poky-build]$ bitbake-selftest -v bb.tests.fetch.FetchCheckStatusTest
test_wget_checkstatus (bb.tests.fetch.FetchCheckStatusTest) ... ok
test_wget_checkstatus_connection_cache (bb.tests.fetch.FetchCheckStatusTest) ... ok

----------------------------------------------------------------------
Ran 2 tests in 23.763s

OK
[daniel@fedora-ws poky-build]$