Merge lp:~cjwatson/convoy/split-common into lp:~launchpad/convoy/packaging

Proposed by Colin Watson
Status: Merged
Merged at revision: 45
Proposed branch: lp:~cjwatson/convoy/split-common
Merge into: lp:~launchpad/convoy/packaging
Diff against target: 78 lines (+29/-9)
3 files modified
debian/changelog (+8/-0)
debian/control (+16/-2)
debian/rules (+5/-7)
To merge this branch: bzr merge lp:~cjwatson/convoy/split-common
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+429016@code.launchpad.net

Commit message

Move /usr/share/convoy/convoy.wsgi to a new convoy-common package.

Description of the change

This allows it to be used in Python-3-only setups.

The fact that python-convoy/python3-convoy depend on the package containing `/usr/share/convoy/convoy.wsgi` rather than the other way round is a bit odd, since `convoy.wsgi` imports from the `convoy` package. However, this is necessary for a smooth upgrade, and it also means that we don't have to pick which Python version `convoy-common` should depend on; this is important since that must be in sync with whether `libapache2-mod-wsgi` or `libapache2-mod-wsgi-py3` is installed. Since `convoy.wsgi` itself is Python-version-agnostic and has no `#!` line, it can safely be shipped in a common package like this.

For people unfamiliar with Debian packaging, the `Breaks`/`Replaces` pair here is the standard way to inform `dpkg` that a file is being intentionally moved to a different package so that it doesn't treat that as an error.

To post a comment you must log in.
lp:~cjwatson/convoy/split-common updated
46. By Colin Watson

Move /usr/share/convoy/convoy.wsgi to a new convoy-common package.

This allows it to be used in Python-3-only setups.

The fact that python-convoy/python3-convoy depend on the package
containing `/usr/share/convoy/convoy.wsgi` rather than the other way
round is a bit odd, since `convoy.wsgi` imports from the `convoy`
package. However, this is necessary for a smooth upgrade, and it also
means that we don't have to pick which Python version `convoy-common`
should depend on; this is important since that must be in sync with
whether `libapache2-mod-wsgi` or `libapache2-mod-wsgi-py3` is installed.
Since `convoy.wsgi` itself is Python-version-agnostic and has no `#!`
line, it can safely be shipped in a common package like this.

Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍

review: Approve

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 2019-10-11 23:10:38 +0000
3+++ debian/changelog 2022-08-26 19:35:16 +0000
4@@ -1,3 +1,11 @@
5+convoy (0.4.4+bzr39-0lp6) UNRELEASED; urgency=medium
6+
7+ * Drop unused dependencies on python-cssutils/python3-cssutils.
8+ * Move /usr/share/convoy/convoy.wsgi to a new convoy-common package,
9+ allowing it to be used in Python-3-only setups.
10+
11+ -- Colin Watson <cjwatson@ubuntu.com> Fri, 26 Aug 2022 19:44:41 +0100
12+
13 convoy (0.4.4+bzr39-0lp5) xenial; urgency=medium
14
15 [ zriv ]
16
17=== modified file 'debian/control'
18--- debian/control 2019-10-11 22:59:44 +0000
19+++ debian/control 2022-08-26 19:35:16 +0000
20@@ -17,9 +17,23 @@
21 Standards-Version: 3.8.3
22 Homepage: https://launchpad.net/convoy
23
24+Package: convoy-common
25+Architecture: all
26+Depends: ${misc:Depends},
27+Recommends: python3-convoy | python-convoy
28+Breaks: python-convoy (<< 0.4.4+bzr39-0lp6~)
29+Replaces: python-convoy (<< 0.4.4+bzr39-0lp6~)
30+Description: A combo loader WSGI application (common files)
31+ Provides a WSGI application that can be hooked up to a
32+ generic WSGI container to create a combo loader server, for
33+ loading Javascript and CSS files combined into a single
34+ request.
35+ .
36+ This package installs common files for both Python 2 and 3.
37+
38 Package: python-convoy
39 Architecture: all
40-Depends: python-cssutils,
41+Depends: convoy-common (= ${binary:Version}),
42 ${misc:Depends},
43 ${python:Depends},
44 Description: A combo loader WSGI application (Python 2)
45@@ -32,7 +46,7 @@
46
47 Package: python3-convoy
48 Architecture: all
49-Depends: python3-cssutils,
50+Depends: convoy-common (= ${binary:Version}),
51 ${misc:Depends},
52 ${python3:Depends},
53 Description: A combo loader WSGI application (Python 3)
54
55=== renamed file 'debian/python-convoy.install' => 'debian/convoy-common.install'
56=== modified file 'debian/rules'
57--- debian/rules 2019-10-11 23:08:45 +0000
58+++ debian/rules 2022-08-26 19:35:16 +0000
59@@ -7,14 +7,12 @@
60 %:
61 dh $@ --with python2,python3 --buildsystem pybuild
62
63-override_dh_python3:
64- dh_python3
65- install -m644 \
66- debian/convoy.wsgi \
67- debian/python3-convoy/usr/lib/python3/dist-packages/convoy/wsgi.py
68-
69 override_dh_link:
70 set -e; for py2 in $$(pyversions -vr); do \
71- dh_link usr/share/convoy/convoy.wsgi \
72+ dh_link -ppython-convoy \
73+ usr/share/convoy/convoy.wsgi \
74 usr/lib/python$$py2/dist-packages/convoy/wsgi.py; \
75 done
76+ dh_link -ppython3-convoy \
77+ usr/share/convoy/convoy.wsgi \
78+ usr/lib/python3/dist-packages/convoy/wsgi.py

Subscribers

People subscribed via source and target branches