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
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-01 17:42:18 +0000
+++ debian/changelog 2017-03-02 15:04:20 +0000
@@ -1,3 +1,13 @@
1software-properties (0.96.24.10) UNRELEASED; urgency=medium
2
3 * debian/tests/run-tests: Use gpg, not gpg1.
4 * softwareproperties/shortcuts.py: Make add_key() return True. Since r988,
5 the return value of add_key() is now used to raise an exception.
6 ShortcutHandler.add_key() always succeeds, so should return True. This
7 fixes a testsuite failure.
8
9 -- Iain Lane <iain@orangesquash.org.uk> Thu, 02 Mar 2017 14:57:39 +0000
10
1software-properties (0.96.24.9) zesty; urgency=medium11software-properties (0.96.24.9) zesty; urgency=medium
212
3 [ Scott Moser & Dimitri John Ledkov ]13 [ Scott Moser & Dimitri John Ledkov ]
414
=== modified file 'debian/tests/run-tests'
--- debian/tests/run-tests 2016-09-12 11:49:08 +0000
+++ debian/tests/run-tests 2017-03-02 15:04:20 +0000
@@ -16,7 +16,7 @@
16# dirmngr and/or gpg-agent fail without ~/.gnupg present maybe some16# dirmngr and/or gpg-agent fail without ~/.gnupg present maybe some
17# places should be properly declaring homedir, instead of just17# places should be properly declaring homedir, instead of just
18# keyrings18# keyrings
19gpg1 -k >/dev/null 2>&119gpg -k >/dev/null 2>&1
2020
21code=021code=0
22if [ "$TMPDIR" ]; then22if [ "$TMPDIR" ]; then
2323
=== modified file 'softwareproperties/shortcuts.py'
--- softwareproperties/shortcuts.py 2014-09-24 09:50:37 +0000
+++ softwareproperties/shortcuts.py 2017-03-02 15:04:20 +0000
@@ -31,7 +31,7 @@
31 self.shortcut = shortcut31 self.shortcut = shortcut
3232
33 def add_key(self, keyserver=None):33 def add_key(self, keyserver=None):
34 return None34 return True
3535
36 def expand(self, codename=None, distro=None):36 def expand(self, codename=None, distro=None):
37 return (self.shortcut, None)37 return (self.shortcut, None)

Subscribers

People subscribed via source and target branches

to status/vote changes: