Merge lp:~smoser/maas-images/trunk.proposed-kpack into lp:maas-images

Proposed by Scott Moser
Status: Merged
Merged at revision: 388
Proposed branch: lp:~smoser/maas-images/trunk.proposed-kpack
Merge into: lp:maas-images
Diff against target: 57 lines (+9/-6)
3 files modified
bin/kpack-from-image (+3/-2)
bin/maas-cloudimg2eph2 (+3/-1)
bin/maas-cloudimg2ephemeral (+3/-3)
To merge this branch: bzr merge lp:~smoser/maas-images/trunk.proposed-kpack
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
Review via email: mp+335790@code.launchpad.net

Commit message

Cleanups around use of --proposed.

The --proposed flag was not getting all the way through to
kpack-from-image. This modification just gets it set all the way through.
It isn't strictly needed, because the image that it runs in will have
proposed enabled already, but passing it through makes it more obvious.

In kpack-from-image, use the same .list file name that is used in
maas-cloudimg2eph and also enable universe and multiverse as are done there.

Also some cleanups:
 - dist_upgrade was set to 'false' by default, but then enabled to either
   'true' or '1'. Just be consistent and set to true to avoid confusion.
 - fix a debug message that reported about ppa when it should have reported
   about proposed.

To post a comment you must log in.
390. By Scott Moser

do not pass --proposed to handle_kpack, say why not needed

391. By Scott Moser

kpack-from-image: for proposed, use same file and archive and components

392. By Scott Moser

and now jsut pass it anyway

Revision history for this message
Lee Trager (ltrager) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/kpack-from-image'
--- bin/kpack-from-image 2017-12-13 20:31:28 +0000
+++ bin/kpack-from-image 2018-01-06 02:15:06 +0000
@@ -299,9 +299,10 @@
299 { error "failed to read release"; return 1; }299 { error "failed to read release"; return 1; }
300 if $proposed; then300 if $proposed; then
301 local mirror=${UBUNTU_MIRROR:-http://archive.ubuntu.com/ubuntu/}301 local mirror=${UBUNTU_MIRROR:-http://archive.ubuntu.com/ubuntu/}
302 proposed_lfile="/etc/apt/sources.list.d/proposed-$rel.list"302 proposed_lfile="/etc/apt/sources.list.d/proposed.list"
303 debug 1 "adding proposed ($mirror) to $proposed_lfile"303 debug 1 "adding proposed ($mirror) to $proposed_lfile"
304 echo "deb $mirror ${rel}-proposed main" > "$proposed_lfile"304 echo "deb $mirror ${rel}-proposed main universe multiverse" \
305 > "$proposed_lfile"
305 $skip_update && 306 $skip_update &&
306 { skip_update=false; debug 1 "enabling update due to proposed"; }307 { skip_update=false; debug 1 "enabling update due to proposed"; }
307 fi308 fi
308309
=== modified file 'bin/maas-cloudimg2eph2'
--- bin/maas-cloudimg2eph2 2017-10-06 20:52:17 +0000
+++ bin/maas-cloudimg2eph2 2018-01-06 02:15:06 +0000
@@ -608,7 +608,9 @@
608 ddebug 1 "starting kpacks: ${kpacks[*]}"608 ddebug 1 "starting kpacks: ${kpacks[*]}"
609 for i in "${kpacks[@]}"; do609 for i in "${kpacks[@]}"; do
610 IFS=","; set -- $i; IFS="$oifs"610 IFS=","; set -- $i; IFS="$oifs"
611 handle_kpack "$imgfile" "$@" ||611 # handle_kpack doesn't actually need $proposed_flag, because $imgfile
612 # will have it already enabled, but passing it is more obvious.
613 handle_kpack $proposed_flag "$imgfile" "$@" ||
612 { error "handle_kpack '$imgfile' $* failed"; return 1; }614 { error "handle_kpack '$imgfile' $* failed"; return 1; }
613 done615 done
614 ddebug 1 "kpacks done"616 ddebug 1 "kpacks done"
615617
=== modified file 'bin/maas-cloudimg2ephemeral'
--- bin/maas-cloudimg2ephemeral 2017-05-05 15:19:06 +0000
+++ bin/maas-cloudimg2ephemeral 2018-01-06 02:15:06 +0000
@@ -265,7 +265,7 @@
265 printf "%s\n" "$IMAGES_PPA_APT_KEY" | apt-key add - ||265 printf "%s\n" "$IMAGES_PPA_APT_KEY" | apt-key add - ||
266 { error "apt-key add failed!"; return 1; }266 { error "apt-key add failed!"; return 1; }
267 debug 1 "addition of PPA turns dist-upgrade on"267 debug 1 "addition of PPA turns dist-upgrade on"
268 dist_upgrade=1268 dist_upgrade=true
269 else269 else
270 log_change false "$change"270 log_change false "$change"
271 debug 1 "not adding images ppa to release=$release"271 debug 1 "not adding images ppa to release=$release"
@@ -283,10 +283,10 @@
283 echo "deb $mirror ${release}-proposed main universe multiverse" > "$PROPOSED_ARCHIVE_FILE" ||283 echo "deb $mirror ${release}-proposed main universe multiverse" > "$PROPOSED_ARCHIVE_FILE" ||
284 { error "failed writing to $PROPOSED_ARCHIVE_FILE"; return 1; }284 { error "failed writing to $PROPOSED_ARCHIVE_FILE"; return 1; }
285 debug 1 "addition of proposed turns dist-upgrade on"285 debug 1 "addition of proposed turns dist-upgrade on"
286 dist_upgrade=1286 dist_upgrade=true
287 else287 else
288 log_change false "$change"288 log_change false "$change"
289 debug 1 "not adding images ppa to release=$release"289 debug 1 "not enabling proposed for $release (proposed=$proposed)."
290 fi290 fi
291291
292 change="ensure mellanox mlx4_en gets loaded (LP: #1115710)"292 change="ensure mellanox mlx4_en gets loaded (LP: #1115710)"

Subscribers

People subscribed via source and target branches