[OE-core] [PATCH] buildhistory.bbclass: Improve robustness in image file listing

Paul Eggleton paul.eggleton at linux.intel.com
Tue Jan 28 08:59:47 UTC 2014


On Monday 27 January 2014 16:52:45 Randy MacLeod wrote:
> On 14-01-23 07:11 AM, Otavio Salvador wrote:
> > The filenames sometimes may have strange names. With the 'awk' script
> > it handled a limited number of spaces in the filename and a package
> > installing a file named "test file with spaces" would have its name
> > truncated.
> > 
> > This patch uses the find's printf formating to simplify the code and
> > proper handle this case. From a testing image, the only diff produced
> 
> s/proper/properly/
>    Yes, I'm with the grammar police; we're here to be helpful.
> 
> > is:
> > 
> > ,----[ files-in-image.txt diff ]
> > 
> > | --rwxr-xr-x root       root                0 ./usr/bin/test\ file\ with\
> > | +-rwxr-xr-x root       root                0 ./usr/bin/test file with
> > | spaces> 
> > `----
> > 
> > The options used are available since findutils 4.2.5, released in 19
> > Nov 2004, making it available in all supported host distributions.
> 
> Acked-by: Randy MacLeod <Randy.MacLeod at windriver.com>
> 
> Works for me, even on CentOS/RHEL-5.9/10 which does indeed have
> findutils > 4.2.5:
> 
> $ rpm -qf `which find`
> findutils-4.2.27-6.el5
> 
> and the find command seems to work as intended:
> 
>   $ find jj -printf "%M %-10u %-10g %10s %p -> %l\n"  | cut -c 44-
>   jj ->
>   jj/usr ->
>   jj/usr/bin ->
>   jj/usr/bin/test file with spaces ->

So I think this is mostly a good change, however, we don't want those -> if 
the file isn't a symlink. Otavio, can you fix that?

Thanks,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list