← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Julian Edwards has proposed merging lp:~julian-edwards/maas/detect-url-bug-1059416 into lp:~maas-maintainers/maas/packaging.

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)

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1059416 in MAAS: "When upgrading from the maas package, the cluster controller package doesn't detect MAAS_URL but it could"
  https://bugs.launchpad.net/maas/+bug/1059416
  Bug #1059973 in maas (Ubuntu): "purging packages can't remove files because dirs are not empty"
  https://bugs.launchpad.net/ubuntu/+source/maas/+bug/1059973

For more details, see:
https://code.launchpad.net/~julian-edwards/maas/detect-url-bug-1059416/+merge/127650
-- 
https://code.launchpad.net/~julian-edwards/maas/detect-url-bug-1059416/+merge/127650
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/detect-url-bug-1059416 into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/changelog'
--- debian/changelog	2012-10-03 01:35:15 +0000
+++ debian/changelog	2012-10-03 06:53:21 +0000
@@ -1,10 +1,14 @@
-maas (0.1+bzr1137+dfsg-0ubuntu2) UNRELEASED; urgency=low
+maas (0.1+bzr1139+dfsg-0ubuntu2) UNRELEASED; urgency=low
 
   * New upstream release.
 
   [ Julian Edwards ]
   * Ensure isc-dhcp-server is disabled when installing maas-dhcp.
   * Ensure maas-dns creates the maas user before trying to chown files.
+  * 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)
 
   [ Raphaël Badin ]
   * Split celery config into cluster and region configs.
@@ -26,7 +30,7 @@
   * debian/control: Depends on python-netifaces.
   * debian/maas-region-controller: Install maas-import-squashfs
 
- -- Julian Edwards <julian.edwards@xxxxxxxxxxxxx>  Wed, 03 Oct 2012 11:26:05 +1000
+ -- Julian Edwards <julian.edwards@xxxxxxxxxxxxx>  Wed, 03 Oct 2012 16:49:24 +1000
 
 maas (0.1+bzr1110+dfsg-0ubuntu1) quantal; urgency=low
 

=== modified file 'debian/maas-cluster-controller.config'
--- debian/maas-cluster-controller.config	2012-10-02 02:29:02 +0000
+++ debian/maas-cluster-controller.config	2012-10-03 06:53:21 +0000
@@ -1,9 +1,8 @@
 #!/bin/sh -e
 
 # Only ask for new installations and reconfiguring.
-# XXX Fix to not ask during new installations when upgrading from the old
-# maas package or installing from the CD.
-if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ]; then
+# XXX Fix to not ask when installing from the CD.
+if ([ "$1" = "configure" ] && [ -z "$2" ]); then
     . /usr/share/debconf/confmodule
 
     db_get maas-cluster-controller/maas-url || true
@@ -14,8 +13,16 @@
         if [ -e /etc/maas/maas_local_settings.py ]; then
             url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
             db_set maas-cluster-controller/maas-url "$url"
+        else
+            # Will only get here if dbconf value not already set, or
+            # /etc/maas/maas_local_settings.py doesn't exist.
+            db_input medium maas-cluster-controller/maas-url || true
+            db_go
         fi
     fi
+fi
+
+if [ "$1" = "reconfigure" ]; then
     db_input high maas-cluster-controller/maas-url || true
     db_go
 fi

=== added file 'debian/maas-cluster-controller.prerm'
--- debian/maas-cluster-controller.prerm	1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.prerm	2012-10-03 06:53:21 +0000
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+exit 0

=== modified file 'debian/maas-cluster-controller.templates'
--- debian/maas-cluster-controller.templates	2012-09-20 07:21:58 +0000
+++ debian/maas-cluster-controller.templates	2012-10-03 06:53:21 +0000
@@ -1,6 +1,7 @@
 Template: maas-cluster-controller/maas-url
 Type: string
-Default: http://<MAAS host>/MAAS
+Default:
 _Description: Ubuntu MAAS API address:
  The MAAS Cluster Controller needs to contact the MAAS server to
- register its presence.  Set the URL to the MAAS API here.
+ register its presence.  Set the URL to the MAAS API here, e.g.
+ http://192.168.1.1/MAAS