Merge lp:~bzoltan/click/add_overlay_ppa into lp:click/devel

Proposed by Zoltan Balogh on 2015-09-25
Status: Merged
Merged at revision: 580
Proposed branch: lp:~bzoltan/click/add_overlay_ppa
Merge into: lp:click/devel
Diff against target: 98 lines (+49/-25)
1 file modified
click/chroot.py (+49/-25)
To merge this branch: bzr merge lp:~bzoltan/click/add_overlay_ppa
Reviewer Review Type Date Requested Status
Colin Watson 2015-09-25 Approve on 2015-10-05
Review via email: mp+272428@code.launchpad.net

Commit Message

Add and pin up the Overlay PPA

Description of the Change

Add and pin up the Overlay PPA

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

You need to make this only apply to 15.04 frameworks, since the overlay PPA doesn't exist for anything else right now.

review: Needs Fixing
lp:~bzoltan/click/add_overlay_ppa updated on 2015-09-26
581. By Zoltan Balogh on 2015-09-26

Change silo.pref to stable-phone-overlay.pref and make pep8 happy

582. By Zoltan Balogh on 2015-09-26

Change silo.pref to stable-phone-overlay.pref and make pep8 happy

583. By Zoltan Balogh on 2015-09-26

Remove wrong changelog entry

584. By Zoltan Balogh on 2015-09-26

Remove wrong changelog entry

585. By Zoltan Balogh on 2015-09-26

Add Overlay PPA only to 15.04 targets

586. By Zoltan Balogh on 2015-09-26

Add Overlay PPA only to 15.04 targets

587. By Zoltan Balogh on 2015-09-26

fix the condition

Zoltan Balogh (bzoltan) wrote :

I have added a check if the target is 15.04.

Colin Watson (cjwatson) :
lp:~bzoltan/click/add_overlay_ppa updated on 2015-10-05
588. By Zoltan Balogh on 2015-10-02

Address comments from cjwatson

589. By Zoltan Balogh on 2015-10-02

Ehh, silly fi there

590. By Zoltan Balogh on 2015-10-05

remove code duplication

Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'click/chroot.py'
2--- click/chroot.py 2015-06-30 08:15:16 +0000
3+++ click/chroot.py 2015-10-05 11:19:26 +0000
4@@ -208,6 +208,8 @@
5
6 GEOIP_SERVER = "http://geoip.ubuntu.com/lookup"
7
8+overlay_ppa = "ci-train-ppa-service/stable-phone-overlay"
9+
10
11 def get_geoip_country_code_prefix():
12 click_no_local_mirror = os.environ.get('CLICK_NO_LOCAL_MIRROR', 'auto')
13@@ -225,6 +227,7 @@
14 pass
15 return ""
16
17+
18 def generate_sources(series, native_arch, target_arch,
19 archive_mirror, ports_mirror, components):
20 """Generate a list of strings for apts sources.list.
21@@ -427,31 +430,52 @@
22 finish_script = "%s/finish.sh" % mount
23 with open(finish_script, 'w') as finish:
24 finish.write(dedent("""\
25- #!/bin/bash
26- set -e
27- # Configure target arch
28- dpkg --add-architecture {target_arch}
29- # Reload package lists
30- apt-get update || true
31- # Pull down signature requirements
32- apt-get -y --force-yes install gnupg ubuntu-keyring
33- # Reload package lists
34- apt-get update || true
35- # Disable debconf questions so that automated builds won't prompt
36- echo set debconf/frontend Noninteractive | debconf-communicate
37- echo set debconf/priority critical | debconf-communicate
38- apt-get -y --force-yes dist-upgrade
39- # Install basic build tool set to match buildd
40- apt-get -y --force-yes install {build_pkgs}
41- # Set up expected /dev entries
42- if [ ! -r /dev/stdin ]; then ln -s /proc/self/fd/0 /dev/stdin; fi
43- if [ ! -r /dev/stdout ]; then ln -s /proc/self/fd/1 /dev/stdout; fi
44- if [ ! -r /dev/stderr ]; then ln -s /proc/self/fd/2 /dev/stderr; fi
45- # Clean up
46- rm /finish.sh
47- apt-get clean
48- """).format(target_arch=self.target_arch,
49- build_pkgs=' '.join(build_pkgs)))
50+ #!/bin/bash
51+ set -e
52+ # Configure target arch
53+ dpkg --add-architecture {target_arch}
54+ # Reload package lists
55+ apt-get update || true
56+ # Pull down signature requirements
57+ apt-get -y --force-yes install gnupg ubuntu-keyring
58+ """).format(target_arch=self.target_arch))
59+ if self.series == "vivid":
60+ finish.write(dedent("""\
61+ apt-get -y --force-yes install software-properties-common
62+ add-apt-repository -y ppa:{ppa}
63+ echo "Package: *" \
64+ > /etc/apt/preferences.d/stable-phone-overlay.pref
65+ echo \
66+ "Pin: release o=LP-PPA-{pin_ppa}" \
67+ >> /etc/apt/preferences.d/stable-phone-overlay.pref
68+ echo "Pin-Priority: 1001" \
69+ >> /etc/apt/preferences.d/stable-phone-overlay.pref
70+ """).format(ppa=overlay_ppa,
71+ pin_ppa=re.sub('/', '-', overlay_ppa)))
72+ finish.write(dedent("""\
73+ # Reload package lists
74+ apt-get update || true
75+ # Disable debconf questions
76+ # so that automated builds won't prompt
77+ echo set debconf/frontend Noninteractive | debconf-communicate
78+ echo set debconf/priority critical | debconf-communicate
79+ apt-get -y --force-yes dist-upgrade
80+ # Install basic build tool set to match buildd
81+ apt-get -y --force-yes install {build_pkgs}
82+ # Set up expected /dev entries
83+ if [ ! -r /dev/stdin ]; then
84+ ln -s /proc/self/fd/0 /dev/stdin;
85+ fi
86+ if [ ! -r /dev/stdout ]; then
87+ ln -s /proc/self/fd/1 /dev/stdout;
88+ fi
89+ if [ ! -r /dev/stderr ]; then
90+ ln -s /proc/self/fd/2 /dev/stderr;
91+ fi
92+ # Clean up
93+ rm /finish.sh
94+ apt-get clean
95+ """).format(build_pkgs=' '.join(build_pkgs)))
96 return finish_script
97
98 def _debootstrap(self, components, mount, archive):

Subscribers

People subscribed via source and target branches

to all changes: