Merge lp:~laney/software-properties/test-fixes into lp:software-properties

Proposed by Iain Lane
Status: Merged
Merge reported by: Scott Moser
Merged at revision: not available
Proposed branch: lp:~laney/software-properties/test-fixes
Merge into: lp:software-properties
Diff against target: 43 lines (+12/-2)
3 files modified
debian/changelog (+10/-0)
debian/tests/run-tests (+1/-1)
softwareproperties/shortcuts.py (+1/-1)
To merge this branch: bzr merge lp:~laney/software-properties/test-fixes
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Pending
Scott Moser Pending
Ubuntu Core Development Team Pending
Review via email: mp+318784@code.launchpad.net

Description of the change

AFAICS the change from https://code.launchpad.net/~smoser/software-properties/trunk.lp1532855/+merge/318132 broke the testsuite.

I think that add_key() needs to return a boolean. The one in ShortcutHandler constantly succeeds, so it seems that it should return True all the time. Please sanity check this.

Also the autopkgtests call gpg1 which isn't installed any more - I think they can just call gpg instead. At least they pass for me like this.

To reproduce, with working lxd:

  $ autopkgtest-build-lxd images:ubuntu/zesty/amd64
  $ autopkgtest --shell-fail -U --apt-pocket=proposed=src:software-properties /path/to/software-properties.dsc -- lxd autopkgtest/ubuntu/zesty/amd64

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Oh, to reproduce the failure, pass 'software-properties' instead of a dsc file (use the dsc to test the fix, or an amd64.changes if that changes file contains source too [e.g. sbuild ... -s]). In that case autopkgtest will get the package from the archive.

Revision history for this message
Iain Lane (laney) wrote :

Would you please review this?

Revision history for this message
Scott Moser (smoser) wrote :

thank you Iain.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-03-01 17:42:18 +0000
3+++ debian/changelog 2017-03-02 15:04:20 +0000
4@@ -1,3 +1,13 @@
5+software-properties (0.96.24.10) UNRELEASED; urgency=medium
6+
7+ * debian/tests/run-tests: Use gpg, not gpg1.
8+ * softwareproperties/shortcuts.py: Make add_key() return True. Since r988,
9+ the return value of add_key() is now used to raise an exception.
10+ ShortcutHandler.add_key() always succeeds, so should return True. This
11+ fixes a testsuite failure.
12+
13+ -- Iain Lane <iain@orangesquash.org.uk> Thu, 02 Mar 2017 14:57:39 +0000
14+
15 software-properties (0.96.24.9) zesty; urgency=medium
16
17 [ Scott Moser & Dimitri John Ledkov ]
18
19=== modified file 'debian/tests/run-tests'
20--- debian/tests/run-tests 2016-09-12 11:49:08 +0000
21+++ debian/tests/run-tests 2017-03-02 15:04:20 +0000
22@@ -16,7 +16,7 @@
23 # dirmngr and/or gpg-agent fail without ~/.gnupg present maybe some
24 # places should be properly declaring homedir, instead of just
25 # keyrings
26-gpg1 -k >/dev/null 2>&1
27+gpg -k >/dev/null 2>&1
28
29 code=0
30 if [ "$TMPDIR" ]; then
31
32=== modified file 'softwareproperties/shortcuts.py'
33--- softwareproperties/shortcuts.py 2014-09-24 09:50:37 +0000
34+++ softwareproperties/shortcuts.py 2017-03-02 15:04:20 +0000
35@@ -31,7 +31,7 @@
36 self.shortcut = shortcut
37
38 def add_key(self, keyserver=None):
39- return None
40+ return True
41
42 def expand(self, codename=None, distro=None):
43 return (self.shortcut, None)

Subscribers

People subscribed via source and target branches

to status/vote changes: