Bug 12254 - Blank Lines in volatile files duplicated the previous one
Summary: Blank Lines in volatile files duplicated the previous one
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: All Multiple
: Undecided normal
Target Milestone: ---
Assignee: Joshua Watt
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-10-19 21:59 UTC by Joshua Watt
Modified: 2017-10-20 12:58 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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