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

Subscribers

People subscribed via source and target branches