Mock 'Directory not empty' error during --clean

Mike McLean mikem at redhat.com
Mon Mar 7 18:54:54 UTC 2011


On 03/07/2011 04:17 AM, Greg Trahair wrote:
> But when I attempt to clean it, this happens:
>
> $ mock -r dist-rhel5-x86_64 --uniqueext $LOGNAME --clean
...
>    File "/usr/lib/python2.4/site-packages/mock/util.py", line 82, in
> rmtree
>      shutil.rmtree(path, *args, **kargs)
>    File "/usr/lib64/python2.4/shutil.py", line 172, in rmtree
>      onerror(os.rmdir, path, sys.exc_info())
>    File "/usr/lib64/python2.4/shutil.py", line 170, in rmtree
>      os.rmdir(path)
> OSError: [Errno 39] Directory not empty: '/data/mock/dist-rhel5-greg'

It's hard to know without more data. The error is happening within 
os.rmtree.

Have a look at the remains that were not deleted. Is there anything 
unusual about them? Is it possible another process wrote files to 
directory during the clean operation? Does the problem repeat?


More information about the buildsys mailing list