[bitbake-devel] [PATCH] utils: Use rm -rf in remove()

Richard Purdie richard.purdie at linuxfoundation.org
Fri Feb 15 16:00:17 UTC 2013


On Thu, 2013-02-07 at 18:08 -0700, Chris Larson wrote:
> 
> On Thu, Feb 7, 2013 at 4:55 PM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
>         -                shutil.rmtree(name)
>         +                # shutil.rmtree(name) would be ideal but its
>         too slow
>         +                subprocess.call('rm -rf %s' % path,
>         shell=True)
> 
> This is a good idea, but I'm curious about forking off a shell process
> for it. I'd think this would work as well: subprocess.call(['rm',
> '-rf', path])

path can have wildcards in it. The code wasn't entirely obvious so I've
tweaked it after your/Peter's comments. I'm hoping it will help the
problems Martin was seeing too.

Cheers,

Richard






More information about the bitbake-devel mailing list