Bug 250425 - Be able to turn off automatic cache rebuilds
Summary: Be able to turn off automatic cache rebuilds
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 7
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael E Brown
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-01 15:25 UTC by Orion Poplawski
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-02 04:56:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
root.log from mock -r fedora-devel-x86_64 init (21.21 KB, text/plain)
2007-08-01 16:06 UTC, Orion Poplawski
no flags Details

Description Orion Poplawski 2007-08-01 15:25:49 UTC
Description of problem:

The following packages (at least) are installed in my x86_64 development mock
root by default but not in i386:

audit-libs-python
curl
graphviz
libgfortran
libselinux-python
libtiff
libtiff-devel
mesa-libGLU
mesa-libGLU-devel
mesa-libOSMesa
mesa-libOSMesa-devel
openmpi
openmpi-devel
openmpi-libs
policycoreutils
qt4
qt4-devel
qt4-x11
xmlrpc-c 

Also, the following (at least) are present in the i386 root but not listed here: 
http://fedoraproject.org/wiki/Packaging/FullExceptionList

mesa-libGL
mesa-libGL-devel
pkgconfig
xorg-x11-proto-devel

Version-Release number of selected component (if applicable):
0.7.2-1.fc7

Comment 1 Jesse Keating 2007-08-01 15:36:53 UTC
Can you edit your mock config file for this chroot and set the debuglevel to 2,
and then do a mock -r <foo> init and attach the root.log from it?

Comment 2 Orion Poplawski 2007-08-01 16:06:51 UTC
Created attachment 160424 [details]
root.log from mock -r fedora-devel-x86_64 init

Comment 3 Jesse Keating 2007-08-01 17:23:28 UTC
This appears to be unpacking a cached buildroot.  Please remove the cached build
root and do a 'mock -r <foo> clean' before the init call.

Comment 4 Orion Poplawski 2007-08-01 17:33:50 UTC
Ah, didn't know about the cache.  I do a lot of --no-clean builds and this must
be polluting my build root.  How do I avoid this is the future?

Comment 5 Jesse Keating 2007-08-01 18:05:17 UTC
You can disable autocaching in the config file, and maybe even the cli, I don't
recall.

Comment 6 Orion Poplawski 2007-08-01 18:20:05 UTC
I like the cache, I just want to be able to turn off the automatic rebuilding of
it because it gets polluted when doing --no-clean builds.  Perhaps:

--- /usr/bin/mock.orig  2007-08-01 11:59:29.000000000 -0600
+++ /usr/bin/mock       2007-08-01 12:00:08.000000000 -0600
@@ -241,7 +241,7 @@
             if cache_exists:
                 cache_mtime = os.stat(self.cache_file)[stat.ST_MTIME]
                 cache_age_days = (time.time() - cache_mtime) / (60 * 60 * 24)
-                if cache_age_days > self.config['max_cache_age_days']:
+                if self.config['max_cache_age_days'] and cache_age_days >
self.config['max_cache_age_days']:
                     self.config["rebuild_cache"] = True

             if cache_exists and not self.config['rebuild_cache']:

Would allow you to set self.config['max_cache_age_days'] = 0 and turn that part off?



Comment 7 Michael E Brown 2007-08-02 04:48:14 UTC
patch committed for $nextrelease.

Comment 8 Michael E Brown 2007-08-03 14:13:51 UTC
Committed patch above along with a better one. If the build is not 'clean', it
will not rebuild the cache (ie. you specify --no-clean via cmdline or config file.)


Note You need to log in before you can comment on or make changes to this bug.