← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~racb/maas/import-arm into lp:maas

 

Robie Basak has proposed merging lp:~racb/maas/import-arm into lp:maas.

Commit message:
Import armhf/highbank pxe-files and ephemerals by default

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~racb/maas/import-arm/+merge/127567
-- 
https://code.launchpad.net/~racb/maas/import-arm/+merge/127567
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~racb/maas/import-arm into lp:maas.
=== modified file 'etc/maas/import_pxe_files'
--- etc/maas/import_pxe_files	2012-09-29 03:12:23 +0000
+++ etc/maas/import_pxe_files	2012-10-02 18:37:22 +0000
@@ -14,7 +14,7 @@
 
 #RELEASES="oneiric precise"
 RELEASES="precise"
-#ARCHES="amd64/generic i386/generic"
+#ARCHES="amd64/generic i386/generic armhf/highbank"
 #LOCALE="en_US"
 #IMPORT_EPHEMERALS=1
 #IMPORT_SQUASHFS=1

=== modified file 'scripts/maas-import-ephemerals'
--- scripts/maas-import-ephemerals	2012-09-26 20:29:43 +0000
+++ scripts/maas-import-ephemerals	2012-10-02 18:37:22 +0000
@@ -41,7 +41,7 @@
 CONFIG="/etc/maas/import_ephemerals"
 
 RELEASES="precise"
-ARCHES="amd64 i386"
+ARCHES="amd64/generic i386/generic armhf/highbank"
 BUILD_NAME="ephemeral"
 STREAM="released"
 
@@ -338,7 +338,9 @@
 
 updates=0
 for release in $RELEASES; do
-    for arch in $ARCHES; do
+    for arch_tuple in $ARCHES; do
+        arch="${arch_tuple%%/*}"
+        subarch="${arch_tuple#*/}"
 
         query_local "$arch" "$release" "$BUILD_NAME" ||
             fail "failed to query local for $release/$arch"
@@ -382,8 +384,8 @@
 
         # Even if there was no need to update the image, we make sure it
         # gets installed.
-        debug 1 "adding images for $release/$arch/generic to maas"
-        install_tftp_image "$fpfinal_d" "$arch" "generic" "$release" ||
+        debug 1 "adding images for $release/$arch/$subarch to maas"
+        install_tftp_image "$fpfinal_d" "$arch" "$subarch" "$release" ||
             fail "failed to install ftp image [$info]"
 
         target_name="${TARGET_NAME_PREFIX}${name}"

=== modified file 'scripts/maas-import-pxe-files'
--- scripts/maas-import-pxe-files	2012-09-29 03:12:23 +0000
+++ scripts/maas-import-pxe-files	2012-10-02 18:37:22 +0000
@@ -35,7 +35,7 @@
 # armhf/highbank is also supported by this script, but cannot be enabled here
 # until maas-import-ephemerals also supports it or IMPORT_EPHEMERALS is set to
 # 0.
-ARCHES=${ARCHES:-amd64/generic i386/generic}
+ARCHES=${ARCHES:-amd64/generic i386/generic armhf/highbank}
 
 # Command line to download a resource at a given URL into the current
 # directory.  A wget command line will work here, but curl will do as well.
@@ -77,7 +77,12 @@
         armhf/*)
             # No ARM server installers were available in precise, so always go for -updates for now
             # A better general fix is LP: #1052397
-            local installer_url="$PORTS_ARCHIVE/dists/$release-updates/main/installer-${arch%%/*}"
+            if [ "$release" = "precise" ]; then
+                updates=-updates
+            else
+                updates=
+            fi
+            local installer_url="$PORTS_ARCHIVE/dists/${release}${updates}/main/installer-${arch%%/*}"
             echo "$installer_url/current/images/${arch#*/}/netboot/"
             ;;
         *)


Follow ups