Bug 7813

Summary: Whitespace problem with externalsrc lock
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ola Nilsson <ola.x.nilsson>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher
Version: 1.7.1   
Target Milestone: 1.9 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ola Nilsson 2015-05-28 04:43:45 UTC
The line 

d.appendVarFlag(task, "lockfiles", "${S}/singletask.lock")

should be 

d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")

to avoid problems when a task already have a file listed in lockfiles.
Comment 1 Ola Nilsson 2015-05-28 04:56:54 UTC
So if a task already have

do_foo[lockfiles] = "${SOMEDIR}/foo.lock"

externalsrc will change the lockfiles varflag to

"${SOMEDIR}/foo.lock${S}/singletask.lock"

When a tack using this lockfile has run and the lockfile has been removed it still leaves "${SOMEDIR}/foo.lock${S}" behind.  This will cause the foo task in a recipe not usein gexternalsrc to stall waiting for "${SOMEDIR}/foo.lock" - which is now actually a directory.
Comment 2 Ola Nilsson 2015-05-28 05:11:20 UTC
Trying to fix this on master I found it was already fixed in 7b73473bc9d19331a103cf4958059d3ceb84b486.
Comment 3 Ola Nilsson 2015-05-28 11:29:11 UTC
I was wrong, it was not fixed.  Sorry about that.
Comment 4 Paul Eggleton 2015-06-18 11:03:12 UTC
Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0899d9af1da320a857c4dd65db279b0173ad803a

This is probably a candidate for fido as well.
Comment 5 Bogdan Alexandru Voiculescu 2016-01-22 06:43:32 UTC
Verified on jethro: 8c8c4ede3ff5ac8ca739020d9efed91159acccc1