Merge lp:~canonical-platform-qa/utah/remove-custom-deb into lp:utah

Proposed by Max Brustkern
Status: Merged
Approved by: Max Brustkern
Approved revision: 1098
Merged at revision: 1098
Proposed branch: lp:~canonical-platform-qa/utah/remove-custom-deb
Merge into: lp:utah
Diff against target: 115 lines (+4/-44)
5 files modified
Makefile (+2/-6)
debian/utah.install (+0/-1)
tests/test_debs.py (+0/-22)
utah/provisioning/debs.py (+1/-14)
utah/provisioning/provisioning.py (+1/-1)
To merge this branch: bzr merge lp:~canonical-platform-qa/utah/remove-custom-deb
Reviewer Review Type Date Requested Status
Joshua Powers (community) Approve
Canonical CI Engineering Pending
Review via email: mp+318921@code.launchpad.net

Commit message

Remove local python-jsonschema deb since the archive one is good enough.

Description of the change

python-jsonschema has been at 1.3 or higher in the archive for years now. Trusty and later don't require the local deb, and precise will be exiting support shortly, so let's remove that.

To post a comment you must log in.
Revision history for this message
Joshua Powers (powersj) wrote :

LGTM - thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2013-05-23 12:31:08 +0000
3+++ Makefile 2017-03-03 15:02:28 +0000
4@@ -1,8 +1,5 @@
5 PYC_PATTERN?=*.pyc
6-all: python-jsonschema html-docs client conf/utah/bootspeed-preseed.cfg conf/utah/bridged-network-vm.xml conf/utah/config manpages
7-
8-python-jsonschema:
9- apt-get download python-jsonschema
10+all: html-docs client conf/utah/bootspeed-preseed.cfg conf/utah/bridged-network-vm.xml conf/utah/config manpages
11
12 client:
13 [ -d "client" ] || mkdir client
14@@ -36,7 +33,6 @@
15 rm -f utah_*.build
16 rm -f utah_*.changes
17 rm -f utah-*_all.deb
18- rm -f python-jsonschema*.deb
19 cd docs && make clean
20
21-.PHONY: python-jsonschema client clean manpages
22+.PHONY: client clean manpages
23
24=== modified file 'debian/utah.install'
25--- debian/utah.install 2017-02-21 20:46:20 +0000
26+++ debian/utah.install 2017-03-03 15:02:28 +0000
27@@ -4,6 +4,5 @@
28 utah/isotest usr/share/utah
29 utah-client_*_all.deb usr/share/utah
30 utah-common_*_all.deb usr/share/utah
31-python-jsonschema_*_all.deb usr/share/utah
32 templates usr/share/utah
33 utah/yaml2xunit.py usr/bin
34
35=== modified file 'tests/test_debs.py'
36--- tests/test_debs.py 2013-05-24 14:29:23 +0000
37+++ tests/test_debs.py 2017-03-03 15:02:28 +0000
38@@ -58,28 +58,6 @@
39 config.packagedir = self.pkgdir
40 shutil.rmtree(self.tmpdir)
41
42- def _setup_schema(self, oldest, latest):
43- pkgfmt = 'python-jsonschema_0.{}-0~ppa1_all.deb'
44-
45- for x in xrange(oldest, latest + 1):
46- fname = pkgfmt.format(x)
47- with open(os.path.join(self.tmpdir, fname), 'w') as f:
48- f.write('')
49- return pkgfmt.format(latest)
50-
51- def test_missing_schema(self):
52- """Ensure exception is raised when missing schema deb."""
53- self.assertRaises(UTAHProvisioningException, _schema_deb)
54-
55- def test_schema_deb(self):
56- """Check that we return the latest schema deb."""
57-
58- latest = self._setup_schema(1, 3)
59-
60- #ensure we got the latest version of the schema
61- deb = _schema_deb()
62- self.assertEqual(latest, os.path.basename(deb))
63-
64 @patch('apt.cache.Cache')
65 def test_client_debs(self, cache):
66 """Ensure get_client_debs API works."""
67
68=== modified file 'utah/provisioning/debs.py'
69--- utah/provisioning/debs.py 2013-11-11 18:35:53 +0000
70+++ utah/provisioning/debs.py 2017-03-03 15:02:28 +0000
71@@ -18,8 +18,6 @@
72 import apt.cache
73 import os
74
75-from glob import glob
76-
77 from utah.config import config
78 from utah.provisioning.exceptions import UTAHProvisioningException
79
80@@ -37,17 +35,6 @@
81 return path
82
83
84-def _schema_deb():
85- debpath = config.packagedir
86- deb_file_glob = os.path.join(debpath, 'python-jsonschema_*_all.deb')
87- deb_files = glob(deb_file_glob)
88- if not deb_files:
89- msg = 'python-jsonschema package file not found in {}'.format(debpath)
90- raise UTAHProvisioningException(msg)
91- deb_files.sort()
92- return deb_files[-1]
93-
94-
95 def get_client_debs():
96 """Return paths to all .debs required to install the utah-client.
97
98@@ -56,4 +43,4 @@
99 :raises UTAHProvisioningException: When package(s) can't be found
100
101 """
102- return [_schema_deb(), _utah_deb('common'), _utah_deb('client')]
103+ return [_utah_deb('common'), _utah_deb('client')]
104
105=== modified file 'utah/provisioning/provisioning.py'
106--- utah/provisioning/provisioning.py 2013-09-10 16:16:09 +0000
107+++ utah/provisioning/provisioning.py 2017-03-03 15:02:28 +0000
108@@ -301,7 +301,7 @@
109 def installclient(self):
110 """Install the required packages on the machine.
111
112- Install the python-jsonschema, utah-common, and utah-client packages.
113+ Install the utah-common and utah-client packages.
114
115 :raises UTAHProvisioningException: When packages won't install
116

Subscribers

People subscribed via source and target branches