Merge lp:~cjwatson/auto-upgrade-testing/obsolete-conffiles into lp:~auto-upgrade-testing-dev/auto-upgrade-testing/trunk

Proposed by Colin Watson on 2012-03-27
Status: Merged
Merged at revision: 10
Proposed branch: lp:~cjwatson/auto-upgrade-testing/obsolete-conffiles
Merge into: lp:~auto-upgrade-testing-dev/auto-upgrade-testing/trunk
Diff against target: 42 lines (+16/-9)
1 file modified
AutoUpgradeTester/post_upgrade_tests/test_conffiles.py (+16/-9)
To merge this branch: bzr merge lp:~cjwatson/auto-upgrade-testing/obsolete-conffiles
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement 2012-03-27 Approve on 2012-03-27
Review via email: mp+99569@code.launchpad.net

Description of the Change

18:02 <slangasek> cjwatson: which reminds me; half the "obsolete conffiles" still listed on the jenkins reports are actually ones that have been taken over by replacing packages, so should fall out of 'obsolete' the next time the packages are upgraded, I think - is there really anything more we should be doing here? ...
18:02 <slangasek> ... https://jenkins.qa.ubuntu.com/view/Precise%20Upgrade%20Testing%20Dashboard/job/precise-upgrade-lucid-server/ARCH=i386,LTS=lts,PROFILE=server,label=upgrade-test/68/artifact/lts-server/obsolete_conffiles.log
18:03 <slangasek> (console-setup, file, fuse, grub are all in this category)
18:03 <cjwatson> slangasek: sounds like we should fix the autotester to notice that then?
18:03 <cjwatson> I haven't been looking at obsolete conffiles at all, though
18:03 <pitti> cjwatson: it does?
18:04 <slangasek> cjwatson: prolly - just wanted confirmation you didn't think there was anything further we should do packaging side
18:04 <pitti> they become yellow (i. e. tests failed, but upgrade succeeded)
18:04 <cjwatson> pitti: I mean it should not even list cases where some other package has taken them over
18:04 <pitti> ah
18:05 <slangasek> pitti: well, things we don't care about at all should IMHO be green, not yellow :)
18:05 <slangasek> (for whatever value of "don't care about" applies)
18:05 <cjwatson> slangasek: I don't *think* so; in my head that's something Replaces should deal with
18:06 <cjwatson> keyboard-configuration doesn't seem to do anything special to take over console-setup.conf
18:06 <slangasek> yes
18:06 <infinity> I thought Replaces did deal with it...
18:06 <slangasek> and none of these conffiles are listed as "obsolete" on my system
18:06 <slangasek> so I *think* it gets flushed when you do a subsequent upgrade of the replaced package
18:06 <cjwatson> sounds plausible, yes
18:15 <slangasek> cjwatson: confirmed; apt-get install console-setup --> obsolete, apt-get install --reinstall console-setup --> disappeared

This branch removes these cases from the test output.

To post a comment you must log in.
Jean-Baptiste Lallement (jibel) wrote :

Thanks for the fix!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AutoUpgradeTester/post_upgrade_tests/test_conffiles.py'
2--- AutoUpgradeTester/post_upgrade_tests/test_conffiles.py 2012-03-15 16:30:50 +0000
3+++ AutoUpgradeTester/post_upgrade_tests/test_conffiles.py 2012-03-27 17:29:26 +0000
4@@ -23,22 +23,29 @@
5 test_output = ''
6
7 dpkgquery = subprocess.check_output(cmd)
8+ current = set()
9+ obsolete = {}
10 for pkg in dpkgquery.split('\n\n'):
11- obsolete = []
12 pkg = pkg.strip().split('\n')
13 pkgname = pkg[0]
14 cfgfiles = pkg[1:]
15 for cfgfile in cfgfiles:
16- try:
17- (file, md5, status) = cfgfile.strip().split()
18+ cfgbits = cfgfile.strip().split()
19+ if len(cfgbits) < 3:
20+ # No status, not obsolete
21+ current.add(cfgbits[0])
22+ else:
23+ file, md5, status = cfgbits[:3]
24 if 'obsolete' in status:
25- obsolete.append(file)
26- except ValueError:
27- # No status, not obsolete
28- pass
29+ obsolete.setdefault(pkgname, []).append(file)
30+ else:
31+ current.add(file)
32
33- if obsolete:
34- test_output += "%s\n %s\n" % (pkgname, "\n ".join(obsolete))
35+ for pkgname in sorted(obsolete.keys()):
36+ cfgfiles = [cfgfile for cfgfile in obsolete[pkgname]
37+ if cfgfile not in current]
38+ if cfgfiles:
39+ test_output += "%s\n %s\n" % (pkgname, "\n ".join(cfgfiles))
40
41 if test_output:
42 with open(output_file, 'w') as f:

Subscribers

People subscribed via source and target branches