Bug 250425 - Be able to turn off automatic cache rebuilds
Be able to turn off automatic cache rebuilds
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
7
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael E Brown
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-01 11:25 EDT by Orion Poplawski
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-02 00:56:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Orion Poplawski 2007-08-01 11:25:49 EDT
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 11:36:53 EDT
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 12:06:51 EDT
Created attachment 160424 [details]
root.log from mock -r fedora-devel-x86_64 init
Comment 3 Jesse Keating 2007-08-01 13:23:28 EDT
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 13:33:50 EDT
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 14:05:17 EDT
You can disable autocaching in the config file, and maybe even the cli, I don't
recall.
Comment 6 Orion Poplawski 2007-08-01 14:20:05 EDT
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 00:48:14 EDT
patch committed for $nextrelease.
Comment 8 Michael E Brown 2007-08-03 10:13:51 EDT
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.