Description of problem: mock caches directories added to a jail using bind_mount_opts config options. This makes the cache extremely large and takes very long time if the mounted directory is large. Version-Release number of selected component (if applicable): Discovered in mock-1.1.12-1.fc15.noarch. I believe that this is still the problem in 1.1.15. How reproducible: Every time Steps to Reproduce: 1.Added the following to my /etc/mock/site-defaults.cfg config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/users', '/users' )) /users contains several home directories so it is very large. 2.Executed mock -r rhel-5-i386 --buildsrpm --spec mbe.spec --sources SOURCES --no-cleanup-after --resultdir=results --unpriv --uniqueext=mbe Actual results: It took a very long time for the command to complete. The cache file contained /users Expected results: The cache file should not contain /users. bind mounted directories should not be cached since they presumably can be mounted again. Additional info: Here is a little patch that I added in order to avoid this problem: diff --git a/py/mockbuild/plugins/root_cache.py b/py/mockbuild/plugins/root_cache.py index ac53a2f..898f96f 100644 --- a/py/mockbuild/plugins/root_cache.py +++ b/py/mockbuild/plugins/root_cache.py @@ -127,7 +127,7 @@ class RootCache(object): self.state("creating cache") try: mockbuild.util.do( - ["tar"] + self.compressArgs + ["-cf", self.rootCacheFile, + ["tar"] + ["--one-file-system"] + self.compressArgs + ["-cf", self.rootCacheFile, "-C", self.rootObj.makeChrootPath()] + self.exclude_tar_cmds + ["."], shell=False
Piotr, I was working on a different bug for the same problem: https://bugzilla.redhat.com/show_bug.cgi?id=744727 I have to admit that your patch is simpler than mine :) I may combine your addition to the tar command with elements of what I've already done for the config files.
Sorry for missing the fact that there is another bug describing the same problem. I will close this one as a duplicate then. Thanks. *** This bug has been marked as a duplicate of bug 744727 ***