Bug 12254

Summary: Blank Lines in volatile files duplicated the previous one
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Watt <JPEWhacker>
Component: coreAssignee: Joshua Watt <JPEWhacker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Watt 2017-10-19 21:59:53 UTC
If the populate-volatile.sh script encounters a blank line, it duplicates the previous one due to none of the column variables getting new values. Under normal circumstances, this will not manifest in any visible manner. However, if a read-only-rootfs is being used, this causes the host directory path to be leaked into the root file system. This is caused by TNAME getting ROOT_DIR prepended to it twice, once for the actual parsed line, and then again when the blank line is "parsed".

For example, if your rootfs working directory is at /home/me/rootfs, and you have a volatiles file like:

 d root root 0755 /foo/bar
 

Then your rootfs in the working directory will get:

 /home/me/rootfs/foo/bar

And then another entry for the blank line that looks like

 /home/me/rootfs/home/me/rootfs/foo/bar

Then end effect of which is that the final root file system has the paths
 /foo/bar
 /home/me/rootfs/foo/bar
Comment 1 Joshua Watt 2017-10-20 12:58:25 UTC
Nevermind. This was fixed in 438d1230511f0b183e82df3b9d410f0cabcb59d0. That's what I get for using old versions of Poky

Sorry for the churn