Mock 'Directory not empty' error during --clean

Greg Trahair Greg.Trahair at tomtom.com
Tue Mar 8 08:45:00 UTC 2011


Hi Mike,

The directory is completely empty, and mock --init and mock --clean give
the same error.  Even a mock --no-clean --init gives the error.

The strange thing is that I can (as my unprivileged user) just run rmdir
/data/mock/dist-rhel5-greg with no problems, so permissions are not the
culprit.  SELinux is disabled.

I can recreate the problem every time I run mock --init, I have to rmdir
the buildroot before I can continue testing builds.

After a little testing, it seems that /data/mock being NFS is an issue,
as I just changed the buildroot back to /var/lib/mock and all seems ok.
Both /data/mock and /var/lib/mock are set 2775 root:mock.

I can't find any limitations of os.rmtree an nfs.

Regards,
Greg
	

-----Original Message-----
From: buildsys-bounces at lists.fedoraproject.org
[mailto:buildsys-bounces at lists.fedoraproject.org] On Behalf Of Mike
McLean
Sent: Monday, March 07, 2011 7:55 PM
To: buildsys at lists.fedoraproject.org
Subject: Re: Mock 'Directory not empty' error during --clean

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?
--
buildsys mailing list
buildsys at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys


More information about the buildsys mailing list