Merge lp:~julian-edwards/maas/detect-url-bug-1059416 into lp:~maas-maintainers/maas/packaging

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: 117
Merged at revision: 116
Proposed branch: lp:~julian-edwards/maas/detect-url-bug-1059416
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 89 lines (+28/-7)
4 files modified
debian/changelog (+6/-2)
debian/maas-cluster-controller.config (+10/-3)
debian/maas-cluster-controller.prerm (+9/-0)
debian/maas-cluster-controller.templates (+3/-2)
To merge this branch: bzr merge lp:~julian-edwards/maas/detect-url-bug-1059416
Reviewer Review Type Date Requested Status
Jeroen T. Vermeulen (community) Approve
Review via email: mp+127650@code.launchpad.net

Commit message

  * Make maas-cluster-controller autoconfigure itself when upgrading from the
    old maas package. (LP: #1059416)
  * Add missing prerm file for maas-cluster-controller so that .pyc files
    are cleaned up. (LP: #1059973)

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

No pre-imp done! But it's all been tested successfully on my HP cubes.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Just the presence of the .prerm file is enough to get the .pyc files cleaned up!?

Looks a bit weird to me to update an existing debian/changelog entry instead of adding a new one, but I trust you have your reasons.

review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Wednesday 03 October 2012 09:00:43 you wrote:
> Review: Approve
>
> Just the presence of the .prerm file is enough to get the .pyc files cleaned
> up!?

No, the #DEBHELPER# bit does the trick. It gets replaced with some magic when
the package is built!

> Looks a bit weird to me to update an existing debian/changelog entry instead
> of adding a new one, but I trust you have your reasons.

Because it's not released yet. We only add entries generally when releasing.

(I use "dch -e" to edit and "dch -i" to add a new one)

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 2012-10-03 01:35:15 +0000
3+++ debian/changelog 2012-10-03 06:53:21 +0000
4@@ -1,10 +1,14 @@
5-maas (0.1+bzr1137+dfsg-0ubuntu2) UNRELEASED; urgency=low
6+maas (0.1+bzr1139+dfsg-0ubuntu2) UNRELEASED; urgency=low
7
8 * New upstream release.
9
10 [ Julian Edwards ]
11 * Ensure isc-dhcp-server is disabled when installing maas-dhcp.
12 * Ensure maas-dns creates the maas user before trying to chown files.
13+ * Make maas-cluster-controller autoconfigure itself when upgrading from the
14+ old maas package. (LP: #1059416)
15+ * Add missing prerm file for maas-cluster-controller so that .pyc files
16+ are cleaned up. (LP: #1059973)
17
18 [ Raphaƫl Badin ]
19 * Split celery config into cluster and region configs.
20@@ -26,7 +30,7 @@
21 * debian/control: Depends on python-netifaces.
22 * debian/maas-region-controller: Install maas-import-squashfs
23
24- -- Julian Edwards <julian.edwards@canonical.com> Wed, 03 Oct 2012 11:26:05 +1000
25+ -- Julian Edwards <julian.edwards@canonical.com> Wed, 03 Oct 2012 16:49:24 +1000
26
27 maas (0.1+bzr1110+dfsg-0ubuntu1) quantal; urgency=low
28
29
30=== modified file 'debian/maas-cluster-controller.config'
31--- debian/maas-cluster-controller.config 2012-10-02 02:29:02 +0000
32+++ debian/maas-cluster-controller.config 2012-10-03 06:53:21 +0000
33@@ -1,9 +1,8 @@
34 #!/bin/sh -e
35
36 # Only ask for new installations and reconfiguring.
37-# XXX Fix to not ask during new installations when upgrading from the old
38-# maas package or installing from the CD.
39-if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ]; then
40+# XXX Fix to not ask when installing from the CD.
41+if ([ "$1" = "configure" ] && [ -z "$2" ]); then
42 . /usr/share/debconf/confmodule
43
44 db_get maas-cluster-controller/maas-url || true
45@@ -14,8 +13,16 @@
46 if [ -e /etc/maas/maas_local_settings.py ]; then
47 url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
48 db_set maas-cluster-controller/maas-url "$url"
49+ else
50+ # Will only get here if dbconf value not already set, or
51+ # /etc/maas/maas_local_settings.py doesn't exist.
52+ db_input medium maas-cluster-controller/maas-url || true
53+ db_go
54 fi
55 fi
56+fi
57+
58+if [ "$1" = "reconfigure" ]; then
59 db_input high maas-cluster-controller/maas-url || true
60 db_go
61 fi
62
63=== added file 'debian/maas-cluster-controller.prerm'
64--- debian/maas-cluster-controller.prerm 1970-01-01 00:00:00 +0000
65+++ debian/maas-cluster-controller.prerm 2012-10-03 06:53:21 +0000
66@@ -0,0 +1,9 @@
67+#!/bin/sh
68+
69+set -e
70+
71+. /usr/share/debconf/confmodule
72+
73+#DEBHELPER#
74+
75+exit 0
76
77=== modified file 'debian/maas-cluster-controller.templates'
78--- debian/maas-cluster-controller.templates 2012-09-20 07:21:58 +0000
79+++ debian/maas-cluster-controller.templates 2012-10-03 06:53:21 +0000
80@@ -1,6 +1,7 @@
81 Template: maas-cluster-controller/maas-url
82 Type: string
83-Default: http://<MAAS host>/MAAS
84+Default:
85 _Description: Ubuntu MAAS API address:
86 The MAAS Cluster Controller needs to contact the MAAS server to
87- register its presence. Set the URL to the MAAS API here.
88+ register its presence. Set the URL to the MAAS API here, e.g.
89+ http://192.168.1.1/MAAS

Subscribers

People subscribed via source and target branches