[oe] Using tar option strip-components in do_unpack
Phil Blundell
philb at gnu.org
Sat May 15 08:24:08 UTC 2010
On Fri, 2010-05-14 at 23:23 +0200, Henning Heinold wrote:
> I discussed with pb on irc, how it would be the best way to unpack two tar
> archivs into the same directory. He pointed me to the tar strip-components
> options and attached is the outcome. Because base.bbclass is touched it is
> open for discussion here.
> + tar_options = tar_options + ' -f'
> if file.endswith('.tar'):
> - cmd = 'tar x --no-same-owner -f %s' % file
> + cmd = 'tar %s %s' % (tar_options, file)
I think it would be a good idea to try to keep "-f" and the filename
together, rather than splitting them across two strings. It isn't
completely obvious to someone looking at this code that "-f" needs to be
the last thing in tar_options and that the filename needs to follow it
immediately.
So, I suggest not adding -f to tar_options and instead doing something
like:
cmd = 'tar %s -f %s' % (tar_options, file)
Apart from that I think your patch is good. Thanks for looking at this.
p.
More information about the Openembedded-devel
mailing list