Merge lp:~psivaa/auto-package-testing/cache-update-for-sru into lp:~canonical-ci-engineering/auto-package-testing/enabling-sru-testing

Proposed by Para Siva
Status: Merged
Merged at revision: 389
Proposed branch: lp:~psivaa/auto-package-testing/cache-update-for-sru
Merge into: lp:~canonical-ci-engineering/auto-package-testing/enabling-sru-testing
Diff against target: 26 lines (+3/-2)
1 file modified
jenkins/aptcache.py (+3/-2)
To merge this branch: bzr merge lp:~psivaa/auto-package-testing/cache-update-for-sru
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Vincent Ladeuil (community) Approve
Review via email: mp+250314@code.launchpad.net

Commit message

Porting the cache update fix that we did in boottesting

Description of the change

Porting the cache update fix that we did in boottesting. This will be needed if boottesting branch does not land before this. (The fix was to commit the local changes in d-jenkins so that the cache gets properly updated every 10 mins)

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Good catch !

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

This matches the hotfix that is in place on d-jenkins.ubuntu-ci:/var/lib/jenkins/QA/auto-package-testing/jenkins/aptcache.py

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jenkins/aptcache.py'
2--- jenkins/aptcache.py 2014-04-17 09:56:58 +0000
3+++ jenkins/aptcache.py 2015-02-19 14:37:58 +0000
4@@ -54,12 +54,12 @@
5 self.proposed = False
6
7 self.timestampfile = os.path.normpath(
8- os.path.join(rootdir, 'var/cache/apt/pkgcache.bin'))
9+ os.path.join(rootdir, 'var/cache/apt/cache.timestamp'))
10
11 super(AptCache, self).__init__(rootdir=rootdir, memonly=False)
12 self.rootdir = rootdir
13
14- def update(self, cache_age=60, force_update=False):
15+ def update(self, cache_age=10, force_update=False):
16 ''' Equivalent of apt-get update
17
18 :param cache_age: Update the cache when it is older than
19@@ -78,6 +78,7 @@
20 not os.path.exists(self.timestampfile)) or (
21 (currtime - timestamp) > cache_age * 60):
22 logging.debug('Updating cache')
23+ open(self.timestampfile, 'w').close()
24 super(AptCache, self).update()
25 super(AptCache, self).open()
26 else:

Subscribers

People subscribed via source and target branches