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
1=== modified file 'bin/kpack-from-image'
2--- bin/kpack-from-image 2017-12-13 20:31:28 +0000
3+++ bin/kpack-from-image 2018-01-06 02:15:06 +0000
4@@ -299,9 +299,10 @@
5 { error "failed to read release"; return 1; }
6 if $proposed; then
7 local mirror=${UBUNTU_MIRROR:-http://archive.ubuntu.com/ubuntu/}
8- proposed_lfile="/etc/apt/sources.list.d/proposed-$rel.list"
9+ proposed_lfile="/etc/apt/sources.list.d/proposed.list"
10 debug 1 "adding proposed ($mirror) to $proposed_lfile"
11- echo "deb $mirror ${rel}-proposed main" > "$proposed_lfile"
12+ echo "deb $mirror ${rel}-proposed main universe multiverse" \
13+ > "$proposed_lfile"
14 $skip_update &&
15 { skip_update=false; debug 1 "enabling update due to proposed"; }
16 fi
17
18=== modified file 'bin/maas-cloudimg2eph2'
19--- bin/maas-cloudimg2eph2 2017-10-06 20:52:17 +0000
20+++ bin/maas-cloudimg2eph2 2018-01-06 02:15:06 +0000
21@@ -608,7 +608,9 @@
22 ddebug 1 "starting kpacks: ${kpacks[*]}"
23 for i in "${kpacks[@]}"; do
24 IFS=","; set -- $i; IFS="$oifs"
25- handle_kpack "$imgfile" "$@" ||
26+ # handle_kpack doesn't actually need $proposed_flag, because $imgfile
27+ # will have it already enabled, but passing it is more obvious.
28+ handle_kpack $proposed_flag "$imgfile" "$@" ||
29 { error "handle_kpack '$imgfile' $* failed"; return 1; }
30 done
31 ddebug 1 "kpacks done"
32
33=== modified file 'bin/maas-cloudimg2ephemeral'
34--- bin/maas-cloudimg2ephemeral 2017-05-05 15:19:06 +0000
35+++ bin/maas-cloudimg2ephemeral 2018-01-06 02:15:06 +0000
36@@ -265,7 +265,7 @@
37 printf "%s\n" "$IMAGES_PPA_APT_KEY" | apt-key add - ||
38 { error "apt-key add failed!"; return 1; }
39 debug 1 "addition of PPA turns dist-upgrade on"
40- dist_upgrade=1
41+ dist_upgrade=true
42 else
43 log_change false "$change"
44 debug 1 "not adding images ppa to release=$release"
45@@ -283,10 +283,10 @@
46 echo "deb $mirror ${release}-proposed main universe multiverse" > "$PROPOSED_ARCHIVE_FILE" ||
47 { error "failed writing to $PROPOSED_ARCHIVE_FILE"; return 1; }
48 debug 1 "addition of proposed turns dist-upgrade on"
49- dist_upgrade=1
50+ dist_upgrade=true
51 else
52 log_change false "$change"
53- debug 1 "not adding images ppa to release=$release"
54+ debug 1 "not enabling proposed for $release (proposed=$proposed)."
55 fi
56
57 change="ensure mellanox mlx4_en gets loaded (LP: #1115710)"

Subscribers

People subscribed via source and target branches