[OE-core] [PATCH] populate-volatile.sh: normalize repeated leading slashes in TNAME

Phil Blundell pb at pbcl.net
Mon May 20 09:38:09 UTC 2013


On Mon, 2013-05-20 at 19:23 +1000, Jonathan Liu wrote:
> On 20/05/2013 7:19 PM, Phil Blundell wrote:
> > On Mon, 2013-05-20 at 11:29 +1000, Jonathan Liu wrote:
> >> -		TNAME=${ROOT_DIR}/${TNAME}
> >> +		TNAME=`echo ${ROOT_DIR}/${TNAME} | sed -e 's@^//*@/@'`
> > Why is this a good thing?  Your commit message is rather terse.
> >
> > p.
> It reduces the size of /etc/volatile.cache.
> Otherwise for example if you have ROOT_DIR=/, TNAME=/var/log, TNAME 
> becomes ///var/log.
>
> Also if you have verbose mode enabled it actually prints out the extra 
> unnecessary leading slashes.

How many bytes does it actually save on a typical system?  Is this worth
the overhead of forking an extra 2 processes for every line in the
file?  

Would it not be better fixed by requiring TNAME to start with a slash
(which it probably does already), ROOT_DIR to not end with a slash, and
just dropping the intermediate separator?

p.






More information about the Openembedded-core mailing list